--- /Users/sbourget/Desktop/MDL/moodle 1.9 CLEAN/mod/lesson/lib.php 2007-06-21 10:02:56.000000000 -0400 +++ /Applications/MAMP/htdocs/moodle19/mod/lesson/lib.php 2007-07-22 11:09:02.000000000 -0400 @@ -558,4 +558,67 @@ return array('end','start', 'update grade attempt'); } +/** + * Prints lesson summaries on MyMoodle Page + * + */ +function lesson_print_overview($courses, &$htmlarray) { + global $USER, $CFG; +// These next 6 Lines are constant in all modules (just change module name) + if (empty($courses) || !is_array($courses) || count($courses) == 0) { + return array(); + } + + if (!$lessons = get_all_instances_in_courses('lesson',$courses)) { + return; + } +// Get Necessary Sirings + $strlesson = get_string('modulename', 'lesson'); + $strlessoncloses = get_string('lessoncloses', 'lesson'); + $strlessonopens = get_string('lessonopens', 'lesson'); + $strattempts = get_string('attempts', 'lesson'); + $strnotattempted = get_string('nolessonattempts', 'lesson'); + $strattempted = get_string('attempted', 'lesson'); + + foreach ($lessons as $lesson) { + if ($lesson->deadline != 0) { // A lesson is scheduled + $str = '