Moodle
  1. Moodle
  2. MDL-27161

Show 'Require grading' Optional setting in Moodle 2 Assignment displays unhelpful message leading to possible lock out

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.4
    • Component/s: Assignment (2.2)
    • Environment:
      Moodle 2.0.2+ (Build: 20110330)
      php 5.3.3
      MySQL 5.5.9
    • Testing Instructions:
      Hide

      1. login as teacher
      2. select an assignment
      3. on the assignment page, click on 'View xx submitted assignments' link (top right)
      3. within 'optional setting' section, set 'show' to 'require grading' and save it

      If there are no assignment need grading, notification message will be display and 'optional setting' section is also display to allow user to change the value of 'show'. Otherwise, it will show student's assignment that need to be graded.

      Show
      1. login as teacher 2. select an assignment 3. on the assignment page, click on 'View xx submitted assignments' link (top right) 3. within 'optional setting' section, set 'show' to 'require grading' and save it If there are no assignment need grading, notification message will be display and 'optional setting' section is also display to allow user to change the value of 'show'. Otherwise, it will show student's assignment that need to be graded.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27161_head
    • Rank:
      16813

      Description

      With the Assignment module (Offline task) there are 3 Optional settings at the bottom of the 'View xx submitted assignments", i.e. the page where the teacher can see the list of students in order to grade them.

      The first of these three optiona is a drop-down memu: Show: which contains 3-choices: 'All / Submitted / Require grading'

      If teachers select "Require grading", they get this error message:

      "No users were found with permissions to submit this assignment"

      At this point, if a teacher clicks on the browser back button, and returns to the previous screen, he/she will see the list of all the students as before. HOWEVER, if he/she does something else, e.g. returns to the course page, he will be unable to see the list of students the next time she accesses the assignment since the optional setting for 'Show' will be locked in to "Require grading" resulting in the above error message.

      Note: clicking on the other 2 choices (All or Submitted) in the Show menu works as expected.

        Issue Links

          Activity

          Hide
          Rossiani Wijaya added a comment -

          Thanks Peter for reporting.

          The error display a wrong message. It should be something like "there is no required grading" and the optional settings should also be displayed.

          I will create a patch for this.

          Rosie

          Show
          Rossiani Wijaya added a comment - Thanks Peter for reporting. The error display a wrong message. It should be something like "there is no required grading" and the optional settings should also be displayed. I will create a patch for this. Rosie
          Hide
          Rossiani Wijaya added a comment -

          Created patch to address the issue. However I need perform more testing on this patch and make sure it doesn't effect the rest of the code.

          Peter,
          It would be great if you could take a look the patch and help me test the patch.

          Thanks
          Rosie

          PS: I'm attaching the patch on this tracker (i'm having issue with my github).

          Show
          Rossiani Wijaya added a comment - Created patch to address the issue. However I need perform more testing on this patch and make sure it doesn't effect the rest of the code. Peter, It would be great if you could take a look the patch and help me test the patch. Thanks Rosie PS: I'm attaching the patch on this tracker (i'm having issue with my github).
          Hide
          Rossiani Wijaya added a comment -

          attach patch

          Show
          Rossiani Wijaya added a comment - attach patch
          Show
          Rossiani Wijaya added a comment - git diff: https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27161_m20
          Hide
          Aparup Banerjee added a comment -

          Hi Rossi,
          some very minor things:

          the 'No users were found with permissions to submit this assignment' string is now unused everywhere, check with David or docs but do we remove this? i haven't used an AMOS command yet

          else it looks good to me.
          we'll need the test to test all assignment type scenarios.

          Show
          Aparup Banerjee added a comment - Hi Rossi, some very minor things: 'There is no assignment required grading' => 'There are no assignments that require grading' 'There is no assignment has been submitted' => 'There are no submitted assignments' some old whitespace around https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27161_m20#L1R1466 the 'No users were found with permissions to submit this assignment' string is now unused everywhere, check with David or docs but do we remove this? i haven't used an AMOS command yet else it looks good to me. we'll need the test to test all assignment type scenarios.
          Hide
          Rossiani Wijaya added a comment -

          Thanks Apu for reviewing the patch.

          Update patch to fix the language strings and removing 'No users were found with permissions to submit this assignment' string (for now. will confirm with david later if it is ok)

          git diff: https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27161_m20

          Rosie

          Show
          Rossiani Wijaya added a comment - Thanks Apu for reviewing the patch. Update patch to fix the language strings and removing 'No users were found with permissions to submit this assignment' string (for now. will confirm with david later if it is ok) git diff: https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27161_m20 Rosie
          Hide
          Rossiani Wijaya added a comment -

          Update: David's suggestion regarding unused string.

          mudrd8mz@jabber.cz: generally if you are sure the string is not used anywhere, it is pretty safe to remove it. I usually use `git log -S` to find the last usage of the string, just to be sure. the only exception is if you stop using a string in say 2.0.3 while it was still used in 2.0.2. in that case it is better to remove the string from master only

          Based on the above suggestion, the different between 2.0 and 2.1 is on language file:
          Patch for 2.0, 'nosubmitusers' string still available
          Patch for 2.1, 'nosubmitusers' string is removed.

          Show
          Rossiani Wijaya added a comment - Update: David's suggestion regarding unused string. mudrd8mz@jabber.cz: generally if you are sure the string is not used anywhere, it is pretty safe to remove it. I usually use `git log -S` to find the last usage of the string, just to be sure. the only exception is if you stop using a string in say 2.0.3 while it was still used in 2.0.2. in that case it is better to remove the string from master only Based on the above suggestion, the different between 2.0 and 2.1 is on language file: Patch for 2.0, 'nosubmitusers' string still available Patch for 2.1, 'nosubmitusers' string is removed.
          Hide
          Sam Hemelryk added a comment -

          Thanks Rosie this has been integrated now.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Rosie this has been integrated now. Cheers Sam
          Hide
          Helen Foster added a comment -

          Tested two assignment types:

          Online text - pass
          Offline activity - fail - Message is displayed "There are no assignments has been submitted". This is completely wrong, as students don't submit offline activity assignments.

          Show
          Helen Foster added a comment - Tested two assignment types: Online text - pass Offline activity - fail - Message is displayed "There are no assignments has been submitted". This is completely wrong, as students don't submit offline activity assignments.
          Hide
          Sam Hemelryk added a comment -

          Hi Helen,

          Thanks for spotting that I've just been having a look at this now.

          In the case of the offline assignment I don't think the show optional setting is relevant, and certainly if it is the string should be changed.
          As for what to do with this issue presently - Rosie's patch has fixed the greater issue which is that a teacher can lock themselves out of that report by selecting either submitted or require grading if there are now entries for the selected option.
          I'll talk to Eloy when he comes online tonight and see what he thinks - currently I an leaning towards making a commit to fix the 2 new language strings (both need improvements for grammar) and then integrating still and creating a new issue to remove the show option for offline reports.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi Helen, Thanks for spotting that I've just been having a look at this now. In the case of the offline assignment I don't think the show optional setting is relevant, and certainly if it is the string should be changed. As for what to do with this issue presently - Rosie's patch has fixed the greater issue which is that a teacher can lock themselves out of that report by selecting either submitted or require grading if there are now entries for the selected option. I'll talk to Eloy when he comes online tonight and see what he thinks - currently I an leaning towards making a commit to fix the 2 new language strings (both need improvements for grammar) and then integrating still and creating a new issue to remove the show option for offline reports. Cheers Sam
          Hide
          Eloy Lafuente (stronk7) added a comment -

          +1 for followup (high prio) to fix the offline assignment as far as I think the this fix is more important than the failure on message.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - +1 for followup (high prio) to fix the offline assignment as far as I think the this fix is more important than the failure on message. Ciao
          Hide
          Sam Hemelryk added a comment -

          Linked issue to see things tidied up for the offline assignment type.

          Show
          Sam Hemelryk added a comment - Linked issue to see things tidied up for the offline assignment type.
          Hide
          Sam Hemelryk added a comment -

          Marking this integrated again now.
          I've made one small commit to fix the grammar of the two new strings, and have created MDL-27555 to see things cleaned up for the offline assignment type.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Marking this integrated again now. I've made one small commit to fix the grammar of the two new strings, and have created MDL-27555 to see things cleaned up for the offline assignment type. Cheers Sam
          Hide
          Sam Hemelryk added a comment -

          Passed - tested during checking of Helen's findings.

          Show
          Sam Hemelryk added a comment - Passed - tested during checking of Helen's findings.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Closing this, it's already part of upstream, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Closing this, it's already part of upstream, thanks!
          Hide
          Peter Ruthven-Stuart added a comment - - edited

          Thank you to everyone involved in fixing this problem. Once I've installed and tested 2.0.4, I'll let you know how things go.

          Show
          Peter Ruthven-Stuart added a comment - - edited Thank you to everyone involved in fixing this problem. Once I've installed and tested 2.0.4, I'll let you know how things go.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: