Moodle
  1. Moodle
  2. MDL-38254

Add available message to all assignment types

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.4, 2.4.1
    • Fix Version/s: None
    • Component/s: Assignment (2.2)
    • Labels:
    • Testing Instructions:
      Hide
      1. Create an single upload assignment with an available from date in the future
      2. Set 'Prevent late submissions' to 'yes'
      3. It should display the following message "This assignment is not yet available."
      4. Edit the setting and change the due date to the past
      5. It should display the following message "The submission date for this assignment has been closed."

      Repeat the above steps for offline and online assignments.

      Show
      Create an single upload assignment with an available from date in the future Set 'Prevent late submissions' to 'yes' It should display the following message "This assignment is not yet available." Edit the setting and change the due date to the past It should display the following message "The submission date for this assignment has been closed." Repeat the above steps for offline and online assignments.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      MDL-38254_m24
    • Pull Master Branch:
    • Rank:
      48102

      Description

      If the assignment is available from a date in the past/future, then the assignment page should display a proper message.

        Issue Links

          Activity

          Hide
          Ankit Agarwal added a comment -

          Hi Rosie,
          The patch looks good. But am just wondering if we should be handling timezones, in here. Anyways am happy as long as we are using time() at both ends of calls.
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Rosie, The patch looks good. But am just wondering if we should be handling timezones, in here. Anyways am happy as long as we are using time() at both ends of calls. Thanks
          Hide
          Rossiani Wijaya added a comment -

          Hi Ankit,

          Thank you for reviewing.

          When an assignment is created, it doesn't handle the timezones for both timeavailable and timedue. Also the isopen() is using time() to check the assignment's status. That is why I used time() to fixed this issue.

          Submitting for integration review.

          Show
          Rossiani Wijaya added a comment - Hi Ankit, Thank you for reviewing. When an assignment is created, it doesn't handle the timezones for both timeavailable and timedue. Also the isopen() is using time() to check the assignment's status. That is why I used time() to fixed this issue. Submitting for integration review.
          Hide
          Damyon Wiese added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          Thanks!

          Show
          Damyon Wiese added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. Thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sorry, I'm reopening this:

          1) tiny invalid whitespace.
          2) This condition, both in online and uploadsingle... is it correct?

          } else if ($this->assignment->timeavailable < time()) {
              echo $OUTPUT->heading(get_string('closedassignment','assignment'), 3);
          

          isn't "timeavailable" the START of the availability? If so, how can it be considered closed? IMO "timeavailable" only can be used to show the "futureaassignment" message, but not the "closedassignment" one.

          Note that perhaps I'm wrong (haven't looked to every assignment type), but seems that there is a discrepancy between those 2 (online and uploadsingle) and the assignment_base implementation, that seems correct (using "timedue").

          Please, verify... ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Sorry, I'm reopening this: 1) tiny invalid whitespace. 2) This condition, both in online and uploadsingle... is it correct? } else if ($ this ->assignment->timeavailable < time()) { echo $OUTPUT->heading(get_string('closedassignment','assignment'), 3); isn't "timeavailable" the START of the availability? If so, how can it be considered closed? IMO "timeavailable" only can be used to show the "futureaassignment" message, but not the "closedassignment" one. Note that perhaps I'm wrong (haven't looked to every assignment type), but seems that there is a discrepancy between those 2 (online and uploadsingle) and the assignment_base implementation, that seems correct (using "timedue"). Please, verify... ciao
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          Rossiani Wijaya added a comment -

          Hi Eloy,

          Thanks for the feedback.

          The timedue check is done through isopen(), however the function also check for preventlate setting which is available for all types except offline.

          You are right, the above condition should be greater than time for future availability. Updated the patch to fix that and whitespace.

          Re-submit for integration review.

          Show
          Rossiani Wijaya added a comment - Hi Eloy, Thanks for the feedback. The timedue check is done through isopen(), however the function also check for preventlate setting which is available for all types except offline. You are right, the above condition should be greater than time for future availability. Updated the patch to fix that and whitespace. Re-submit for integration review.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 24 and 23.

          To me this sounded like an improvement more than a bug and relatively minor. Please can you consider closing these type of issues wont-fix, mod_assign is the future.

          Show
          Dan Poltawski added a comment - Integrated to master, 24 and 23. To me this sounded like an improvement more than a bug and relatively minor. Please can you consider closing these type of issues wont-fix, mod_assign is the future.
          Hide
          Jason Fowler added a comment -

          25,24,23 - Single Upload - There is no message when the due date is in the past.
          25,24,23 - Online Text - There is no message when the due date is in the past.
          25,24,23 - Offline Submission - There is no message when the due date is in the past.

          Offline is also generating this: Fatal error: Call to a member function heading() on a non-object in /home/jason/www/repos/imaster/moodle/mod/assignment/lib.php on line 169

          Show
          Jason Fowler added a comment - 25,24,23 - Single Upload - There is no message when the due date is in the past. 25,24,23 - Online Text - There is no message when the due date is in the past. 25,24,23 - Offline Submission - There is no message when the due date is in the past. Offline is also generating this: Fatal error: Call to a member function heading() on a non-object in /home/jason/www/repos/imaster/moodle/mod/assignment/lib.php on line 169
          Hide
          Dan Poltawski added a comment -

          This is very disappointing.

          Seems like it has not been tested?

          Show
          Dan Poltawski added a comment - This is very disappointing. Seems like it has not been tested?
          Hide
          Dan Poltawski added a comment -

          I've reverted this and would recommend closing it wont-fix.

          Show
          Dan Poltawski added a comment - I've reverted this and would recommend closing it wont-fix.
          Hide
          Rossiani Wijaya added a comment -

          Hi Dan,

          Sorry for the lack of testing the patch.

          Just finished updating the patch.

          I don't mind closing this issue, because it is an improvement for the assignment module.

          I will leave patch available and close this issue.

          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Dan, Sorry for the lack of testing the patch. Just finished updating the patch. I don't mind closing this issue, because it is an improvement for the assignment module. I will leave patch available and close this issue. Rosie
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: