From 96fa52a47c6c163499bbdb7a036ff237fa2fd622 Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Tue, 29 Jul 2008 16:44:09 +0000 Subject: [PATCH] MDL-15877: Lesson query breaks dml rule about reusing named params (sorry missed a bit) --- mod/lesson/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index c9c11fcf768..b1bbc30e799 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -368,7 +368,8 @@ function lesson_get_user_grades($lesson, $userid=0) { $user GROUP BY u.id"; } - + unset($params['lessonid2']); + unset($params['userid2']); } else { // use only first attempts (with lowest id in lesson_grades table) $firstonly = "SELECT uu.id AS userid, MIN(gg.id) AS firstcompleted