Permalink
Browse files

MDL-34660: Fix SQL error in assignments module with Oracle Database I…

… by replacing 'offline' with 'nosubmissions'
  • Loading branch information...
1 parent 6543380 commit cfe32be82264276eb51eb94db1ba4f3b0268652c Raymond Wijaya committed with stronk7 Aug 24, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/assign/lib.php
View
@@ -258,7 +258,7 @@ function assign_print_overview($courses, &$htmlarray) {
// get all user submissions, indexed by assignment id
- $mysubmissions = $DB->get_records_sql("SELECT a.id AS assignment, a.nosubmissions AS offline, g.timemodified AS timemarked, g.grader AS grader, g.grade AS grade, s.status AS status
+ $mysubmissions = $DB->get_records_sql("SELECT a.id AS assignment, a.nosubmissions AS nosubmissions, g.timemodified AS timemarked, g.grader AS grader, g.grade AS grade, s.status AS status
FROM {assign} a LEFT JOIN {assign_grades} g ON g.assignment = a.id AND g.userid = ? LEFT JOIN {assign_submission} s ON s.assignment = a.id AND s.userid = ?
AND a.id $sqlassignmentids", array_merge(array($USER->id, $USER->id), $assignmentidparams));
@@ -298,7 +298,7 @@ function assign_print_overview($courses, &$htmlarray) {
$str .= '<div class="details">';
$str .= get_string('mysubmission', 'assign');
$submission = $mysubmissions[$assignment->id];
- if ($submission->offline) {
+ if ($submission->nosubmissions) {
$str .= get_string('offline', 'assign');
} else if(!$submission->status || $submission->status == 'draft'){
$str .= $strnotsubmittedyet;

0 comments on commit cfe32be

Please sign in to comment.