File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
www/addons/mod/assign/directives Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,14 @@ angular.module('mm.addons.mod_assign')
227227 scope . timeRemaining = $translate . instant ( 'mma.mod_assign.duedatereached' ) ;
228228 }
229229 } else {
230- if ( scope . userSubmission . timemodified > duedate ) {
230+ var timeSubmittedDiff = scope . userSubmission . timemodified - duedate ;
231+ if ( timeSubmittedDiff > 0 ) {
231232 scope . timeRemaining = $translate . instant ( 'mma.mod_assign.submittedlate' ,
232- { '$a' : $mmUtil . formatDuration ( - timeRemaining , 3 ) } ) ;
233+ { '$a' : $mmUtil . formatDuration ( timeSubmittedDiff , 3 ) } ) ;
233234 scope . timeRemainingClass = 'latesubmission' ;
234235 } else {
235236 scope . timeRemaining = $translate . instant ( 'mma.mod_assign.submittedearly' ,
236- { '$a' : $mmUtil . formatDuration ( - timeRemaining , 3 ) } ) ;
237+ { '$a' : $mmUtil . formatDuration ( - timeSubmittedDiff , 3 ) } ) ;
237238 scope . timeRemainingClass = 'earlysubmission' ;
238239 }
239240 }
You can’t perform that action at this time.
0 commit comments