Permalink
Browse files

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

… by replacing 'offline' with 'nosubmissions'
  • Loading branch information...
Raymond Wijaya
Raymond Wijaya committed Aug 24, 2012
1 parent d71c486 commit 93c18e73c2e75209777c7a998b1906dc837db702
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/assign/lib.php
View
@@ -260,7 +260,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));
@@ -300,7 +300,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 93c18e7

Please sign in to comment.