Marking block showing incorrectly overdue assignments

Marking block showing incorrectly overdue assignments

- Richard Ackland の投稿
返信数: 3

HI, I love the marking block... it has revolutionised my way of using moodle. I have found one small problem which is if an assignment is not given a due date.
In moodle 1.5.2+ I find this feature very useful when using the same course for multiple classes. When I do this however the marking block lists this assignment as overdue for all students. I think it is the way Moodle assigns a date to assignments without a deadline - it seems to give them 1st Jan 1970 or something....

Is there a work around for this feature.

Cheers and keep up the good work !!

Richard

Richard Ackland への返信

Re: Marking block showing incorrectly overdue assignments

- Richard Ackland の投稿

I managed to solve this minor problem by replacing the following lines of code in  "block_marking.php"

(starting at 243)

/// For the block summary, only count unsubmitted that are overdue.
                                if ($assignment->timedue <= $timenow) {
                                    $this->users[$submission->userid]->overdue++;
                                    $asselement->unsubmitted++;
                                }

with the following

/// For the block summary, only count unsubmitted that are overdue.
                                if ($assignment->timedue >0) {
                                    if ($assignment->timedue <= $timenow) {
                                    $this->users[$submission->userid]->overdue++;
                                    $asselement->unsubmitted++;
                                    }
                                }

Hope this helps anyone else trying to use open ended assignment dates.