Post
Started: 1/21/2010 2:46 PM
Picture Placeholder: Moodlerooms
Moodlerooms
Code review changes
Some code change suggestions: In methods IsTeacher() and CreateUserArraysByRole() there are some hard coded IDs. You probably want to replace the role ID's with $CFG->coursemanager or with something from lib/accesslib.php. Replace the contextlevel 50 with the CONTEXT_COURSE constant. We ran into a problem with the cron throwing an uncaught exception (class Exception). We wrapped all the cron code in a try/catch like so: try { // Cron code goes here } catch (Exception $e) { mtrace($e->getMessage()); } All for now, thanks!
Posted: 1/26/2010 7:13 PM
Picture Placeholder: Joe H
Joe H
Thanks for pointing this out we really appriciate this :)  You point is valid and we should try not to use hard coded id as much as possible. It is a really good news to know that we have more and more people helping with the quality of the plugin. Thanks!
Get Microsoft Silverlight
no thanks