Skip to content

Commit

Permalink
Merge branch 'MDL-37883-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Feb 13, 2013
2 parents 6e59159 + 7688a31 commit 583b20a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mod/assign/feedback/offline/importgradesform.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public function definition() {
while ($record = $gradeimporter->next()) {
$user = $record->user;
$grade = $record->grade;
$gradedesc = $grade;
$modified = $record->modified;
$userdesc = fullname($user);
if ($assignment->is_blind_marking()) {
Expand Down Expand Up @@ -134,7 +133,7 @@ public function definition() {
if (!$skip) {
$update = true;
$updates[] = get_string('gradeupdate', 'assignfeedback_offline',
array('grade'=>$gradedesc, 'student'=>$userdesc));
array('grade'=>format_float($grade, 2), 'student'=>$userdesc));
}

if ($ignoremodified || !$stalemodificationdate) {
Expand Down
6 changes: 5 additions & 1 deletion mod/assign/gradingtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public function display_grade($grade, $editable, $userid, $modified) {
if ($grade == -1 || $grade === null) {
return '';
}
return format_float($grade);
return format_float($grade, 2);
} else {
// This is a custom scale.
$scale = $this->assignment->display_grade($grade, false);
Expand Down Expand Up @@ -661,6 +661,10 @@ public function col_timemarked(stdClass $row) {
if ($row->timemarked && $row->grade !== null && $row->grade >= 0) {
$o = userdate($row->timemarked);
}
if ($row->timemarked && $this->is_downloading()) {
// Force it for downloads as it affects import.
$o = userdate($row->timemarked);
}

return $o;
}
Expand Down

0 comments on commit 583b20a

Please sign in to comment.