Permalink
Browse files

MDL-27084: mod/feedback fix bad syntax in database query

  • Loading branch information...
1 parent dae6b38 commit 05edae9f89c755a4169f8ac07b3ea65d82566f2d @tlevi tlevi committed Apr 5, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 mod/feedback/lib.php
View
@@ -1786,10 +1786,10 @@ function feedback_get_page_to_continue($feedbackid, $courseid = false, $guestid
$params = array();
if($courseid) {
- $courseselect = "fv.course_id = :courseid";
+ $courseselect = "AND fv.course_id = :courseid";
$params['courseid'] = $courseid;
}else {
- $courseselect = "1";
+ $courseselect = '';
}
if($guestid) {
@@ -1807,7 +1807,7 @@ function feedback_get_page_to_continue($feedbackid, $courseid = false, $guestid
WHERE fc.id = fv.completed
$userselect
AND fc.feedback = :feedbackid
- AND $courseselect
+ $courseselect
AND fi.id = fv.item
$usergroup";
$params['feedbackid'] = $feedbackid;
@@ -2779,4 +2779,4 @@ function feedback_init_feedback_session() {
$SESSION->feedback = new stdClass();
}
}
-}
+}

0 comments on commit 05edae9

Please sign in to comment.