Asignment with no date

Asignment with no date

by Germán Matías -
Number of replies: 8

I couldn´t find the way of creating an asignment with no due date (students may do it anytime). Did anybody ever do something like that?

Average of ratings: -
In reply to Germán Matías

Re: Asignment with no date

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Set it really far in the future (many years) and the date won't be shown.
In reply to Martin Dougiamas

Re: Asignment with no date

by Germán Matías -

Great ! Much better now but still showing in the course asignments list (mod/assignment/index.php?id=iii). I´ll work on it.

Thank you.

In reply to Martin Dougiamas

Re: Asignment with no date

by Gustav W Delius -
While this solution of setting the dates far in the future will work, it is not really intuitive. I believe that in the long run the date selectors in Moodle should be given an extra checkbox behind them saying something like "no date". Because all date selectors are printed by the central moodle function print_date_selector() this will not be difficult to do. It just takes someone with a bit of knowledge of javascript because when the user ticks the checkbox then the date should be greyed out.
Average of ratings: Useful (1)
In reply to Gustav W Delius

Re: Asignment with no date

by Germán Matías -

I agree that that solution is not the best but disabling the date fields in the form wouldn´t work neither because the module will assign it one anyway and when viewing the assignment you´ll probably see a date in the past, like December 31, 1969 or something like that.

I have been working in a complete solution with a few code modifications. I´ll post it here when it is finished.

In reply to Gustav W Delius

Re: Asignment with no date

by N Hansen -
See bug 1968 about this.
In reply to N Hansen

Re: Asignment with no date

by Germán Matías -

I saw but It was created on Sep-2004 and not yet assigned to any future version. I´d like to contribute but i´m not sure how. Should I start working on some module to achieve this new functionality?

In reply to Germán Matías

Re: Asignment with no date

by Steve Hyndman -

I needed to create assignments with no due date also. I opened mod/assignment/view.php and commented out lines 76 and 77...see below.

//      $strduedate = userdate($assignment->timedue)." ($strdifference)";
  //      echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";

This seems to work for me, but I've only been using it for a couple of months. Does anyone know of any unintended consequences of doing this?

Steve

In reply to Steve Hyndman

Re: Asignment with no date

by Germán Matías -

I think that there couldn´t be any unintended consequences since you´re just commenting an echo line. The date is still showing when listing all the course assigments. You´ll have to comment lines in mod/assignment/index.php too.

Anyway, commenting that line is the same as setting a due date very far in the future, which is a better solutions since you can set it just for an assignment. With your proposed solutions all the assignment will hide their dates.