lesson MDL-23907 fixed - $DB->get_records first selected field should be unique.
authorAparup Banerjee <nebgor@gmail.com>
Tue, 24 Aug 2010 06:47:46 +0000 (06:47 +0000)
committerAparup Banerjee <nebgor@gmail.com>
Tue, 24 Aug 2010 06:47:46 +0000 (06:47 +0000)
mod/lesson/renderer.php

index 7226735..0480e57 100644 (file)
@@ -516,7 +516,7 @@ class mod_lesson_renderer extends plugin_renderer_base {
             }
 
             // collect all of the branch tables viewed
-            if ($viewedbranches = $DB->get_records("lesson_branch", array ("lessonid"=>$lesson->id, "userid"=>$USER->id, "retry"=>$ntries), 'timeseen DESC', 'pageid, id')) {
+            if ($viewedbranches = $DB->get_records("lesson_branch", array ("lessonid"=>$lesson->id, "userid"=>$USER->id, "retry"=>$ntries), 'timeseen DESC', 'id, pageid')) {
                 $viewedpageids = array_merge($viewedpageids, array_keys($viewedbranches));
             }