Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 0d66e33da5657080eacebc19c848dfc56f313cdc 1 parent eb9d692
@tlevi tlevi authored stronk7 committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 mod/feedback/lib.php
View
8 mod/feedback/lib.php
@@ -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();
}
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.