Moodle
  1. Moodle
  2. MDL-34931

Students can not see unhidden grades for hidden activities in the User report

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      Test pre-requisites

      • Assign students to a course
      • Create an assignment (assignment or assign, as you wish)
      • Grade the students for the assignment
      • Disable enablegroupmembersonly
      • Create two groups (Group 1 and 2)
      • Assign Student 1 to Group 1, and Student 2 to Group 2
      • Place Group 1 in a grouping name A and Group 2 in B
      • Open a browser with Student 1 logged in, and another with the admin

      Test steps

      1. The student navigates to Home ► My courses ► COURSE ► Grade administration ► User report
      2. Make sure you can see your grade on the assignment
      3. As an admin, hide the activity
      4. Make sure the student CANNOT see his grade any more
      5. As an admin, go to the gradebook and unhide the assignment grades
      6. Make sure the student CAN see his grade
      1. As admin, enable enablegroupmembersonly
      2. Unhide the assignment
      3. Edit the settings and show advanced
      4. Set 'Grouping' to 'A'
      5. Tick 'Available for group members only'
      6. Make sure the student CAN see his grade
      7. As an admin, set 'Grouping' to 'B'
      8. Make sure the student CANNOT see his grade
      1. As admin, hide the assignment
      2. Edit the settings and show advanced
      3. Set 'Grouping' to 'A'
      4. Tick 'Available for group members only'
      5. As an admin, go to the gradebook and unhide the assignment grades
      6. Make sure the student CAN see his grade
      7. As an admin, set 'Grouping' to 'B'
      8. Go to the gradebook and unhide the assignment grades
      9. Make sure the student CANNOT see his grade
      1. As admin, hide the assignment
      2. Edit the assignment settings and untick 'Available for group members only'
      3. Go to the gradebook and unhide the assignment grades
      4. Make sure the student CAN see his grade
      Show
      Test pre-requisites Assign students to a course Create an assignment (assignment or assign, as you wish) Grade the students for the assignment Disable enablegroupmembersonly Create two groups (Group 1 and 2) Assign Student 1 to Group 1, and Student 2 to Group 2 Place Group 1 in a grouping name A and Group 2 in B Open a browser with Student 1 logged in, and another with the admin Test steps The student navigates to Home ► My courses ► COURSE ► Grade administration ► User report Make sure you can see your grade on the assignment As an admin, hide the activity Make sure the student CANNOT see his grade any more As an admin, go to the gradebook and unhide the assignment grades Make sure the student CAN see his grade As admin, enable enablegroupmembersonly Unhide the assignment Edit the settings and show advanced Set 'Grouping' to 'A' Tick 'Available for group members only' Make sure the student CAN see his grade As an admin, set 'Grouping' to 'B' Make sure the student CANNOT see his grade As admin, hide the assignment Edit the settings and show advanced Set 'Grouping' to 'A' Tick 'Available for group members only' As an admin, go to the gradebook and unhide the assignment grades Make sure the student CAN see his grade As an admin, set 'Grouping' to 'B' Go to the gradebook and unhide the assignment grades Make sure the student CANNOT see his grade As admin, hide the assignment Edit the assignment settings and untick 'Available for group members only' Go to the gradebook and unhide the assignment grades Make sure the student CAN see his grade
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-34931-master
    • Rank:
      43487

      Description

      Something got switched recently, and now students do not see grades for the activities that are hidden on the course homepage, but for which the grade column in unhidden in the gradebook.

      Tested on 2.2.4, 2.3, latest dev

      Create an assignment, grade students
      Hide the assignment
      Go to the gradebook and Unhide the grade column
      Login as a student, and you will not see the grade

      I believe it is pretty urgent.
      Forum: http://moodle.org/mod/forum/discuss.php?d=206790

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          I can reproduce this by hiding an activity on the course page then showing it on the gradebook's categories and items page. A student will then not be able to see the grade.

          Show
          Andrew Davis added a comment - I can reproduce this by hiding an activity on the course page then showing it on the gradebook's categories and items page. A student will then not be able to see the grade.
          Hide
          Miran Zlatovic added a comment -

          Reproduced on 2.3.1

          Show
          Miran Zlatovic added a comment - Reproduced on 2.3.1
          Hide
          Jason Cole added a comment -

          Can we fix it in the next release please? We have a very large client for whom this is an issue.

          Show
          Jason Cole added a comment - Can we fix it in the next release please? We have a very large client for whom this is an issue.
          Hide
          Frédéric Massart added a comment -

          Investigating on this issue, it seem to be a regression caused by MDL-31510. See grade/report/user/lib.php:359.

          Show
          Frédéric Massart added a comment - Investigating on this issue, it seem to be a regression caused by MDL-31510 . See grade/report/user/lib.php:359.
          Hide
          Frédéric Massart added a comment -

          Assigning this issue to myself and adding Andrew as peer reviewer.

          Show
          Frédéric Massart added a comment - Assigning this issue to myself and adding Andrew as peer reviewer.
          Hide
          Frédéric Massart added a comment -

          Pushing this issue for peer review.

          The problem was that we were checking if the activity had been set to be hidden, but not the reason why. I have extracted the portion of code which checks for group access restriction to reuse it. Also, as return false had been commented in the existing code, I used the same logic to skip the printing of the grade nicely as well without skipping the rest of the logic.

          I still wonder about something. If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?

          Show
          Frédéric Massart added a comment - Pushing this issue for peer review. The problem was that we were checking if the activity had been set to be hidden, but not the reason why. I have extracted the portion of code which checks for group access restriction to reuse it. Also, as return false had been commented in the existing code, I used the same logic to skip the printing of the grade nicely as well without skipping the rest of the logic. I still wonder about something. If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?
          Hide
          Frédéric Massart added a comment -

          Pushing this issue to the next sprint as Andrew won't be able to review it for today.

          Show
          Frédéric Massart added a comment - Pushing this issue to the next sprint as Andrew won't be able to review it for today.
          Hide
          Michael de Raadt added a comment -

          Apologies on the delay in getting this issue through.

          With our recent efforts to concentrate on accessibility issues, we have not spent much time looking at Partner issues. We will return to our normal priorities in the next sprint.

          Show
          Michael de Raadt added a comment - Apologies on the delay in getting this issue through. With our recent efforts to concentrate on accessibility issues, we have not spent much time looking at Partner issues. We will return to our normal priorities in the next sprint.
          Hide
          Andrew Davis added a comment -

          [Y] Syntax
          [NA] Output
          [Y] Whitespace
          [NA] Language
          [NA] Databases
          [Y] Testing
          [Y] Security
          [NA] Documentation
          [N] Git
          [Y] Sanity check

          This is something I've been a bit patchy on myself but I dont think the component in the git commit message is correct. Fix both commits if possible or just your own. I think the component should be core_grade. http://docs.moodle.org/dev/Frankenstyle#Core_subsystems

          "If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?"

          I think if the student can see the grade then it should be counted. If the activity is hidden but the student grade is unhidden the grade should count. I think that makes sense. Actually, can anyone who is currently doing this comment as to whether or not they think those grades should be included in the student's course total?

          Whatever we decide it would be worth including checking the course total is either changing or not changing in the testing instructions. They're getting rather lengthy but better safe than sorry with student grades.

          Show
          Andrew Davis added a comment - [Y] Syntax [NA] Output [Y] Whitespace [NA] Language [NA] Databases [Y] Testing [Y] Security [NA] Documentation [N] Git [Y] Sanity check This is something I've been a bit patchy on myself but I dont think the component in the git commit message is correct. Fix both commits if possible or just your own. I think the component should be core_grade. http://docs.moodle.org/dev/Frankenstyle#Core_subsystems "If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?" I think if the student can see the grade then it should be counted. If the activity is hidden but the student grade is unhidden the grade should count. I think that makes sense. Actually, can anyone who is currently doing this comment as to whether or not they think those grades should be included in the student's course total? Whatever we decide it would be worth including checking the course total is either changing or not changing in the testing instructions. They're getting rather lengthy but better safe than sorry with student grades.
          Hide
          Miran Zlatovic added a comment -

          IMO, unhidden grades for hidden activities should count towards total grade and percentage. Primary reason why we want hidden assignments, but unhidden grades is because we often use assignments to collect files that students create in controlled environment. They should be able to see the grades for their work, but we don't want them to have access to uploaded files any more (to avoid distribution of top graded solutions, etc.)

          Show
          Miran Zlatovic added a comment - IMO, unhidden grades for hidden activities should count towards total grade and percentage. Primary reason why we want hidden assignments, but unhidden grades is because we often use assignments to collect files that students create in controlled environment. They should be able to see the grades for their work, but we don't want them to have access to uploaded files any more (to avoid distribution of top graded solutions, etc.)
          Hide
          Kimberly Noseworthy added a comment -

          IMO, we use hidden/offline assignments for posting grades. So, Andrew has explained our situation right on. If the student can see the grade (and not the activity) then it should be counted. If the activity is hidden but the student grade is unhidden the grade should count.

          Show
          Kimberly Noseworthy added a comment - IMO, we use hidden/offline assignments for posting grades. So, Andrew has explained our situation right on. If the student can see the grade (and not the activity) then it should be counted. If the activity is hidden but the student grade is unhidden the grade should count.
          Hide
          Elena Ivanova added a comment -

          If the grade is visible (not-hidden) to the student, it should be counted towards total.

          "If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?"
          I think this refers to the overall Hidden grades handling.
          We have a Setting for both Overview and User report:
          Hide totals if they contain hidden items: Hide, Show Total Excluding Hidden, Show Totals Including Hidden.
          We need this, please do not remove the option

          Show
          Elena Ivanova added a comment - If the grade is visible (not-hidden) to the student, it should be counted towards total. "If the grade is hidden, sometimes it is still taken in account in total grade and percentage, is that something that we want?" I think this refers to the overall Hidden grades handling. We have a Setting for both Overview and User report: Hide totals if they contain hidden items: Hide, Show Total Excluding Hidden, Show Totals Including Hidden. We need this, please do not remove the option
          Hide
          Frédéric Massart added a comment -

          Submitting this for integration after fixing the commit message from my patch. The other commit on master is from another issue, which has been integrated and tested. Cheers!

          Show
          Frédéric Massart added a comment - Submitting this for integration after fixing the commit message from my patch. The other commit on master is from another issue, which has been integrated and tested. Cheers!
          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
          Eloy Lafuente (stronk7) added a comment -

          Somehow the is_user_access_restricted_by_group() causes some "negativeness" in my crazy brain, but...

          ... integrated (22, 23 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Somehow the is_user_access_restricted_by_group() causes some "negativeness" in my crazy brain, but... ... integrated (22, 23 & master), thanks!
          Hide
          Dan Poltawski added a comment -

          Mark was confronted by a broken grub prompt late this evening, so unlikely to be able to do this. Can't be helped so me or one of the integrators will do this if required.

          Show
          Dan Poltawski added a comment - Mark was confronted by a broken grub prompt late this evening, so unlikely to be able to do this. Can't be helped so me or one of the integrators will do this if required.
          Hide
          Dan Poltawski added a comment -

          Looks good on master, but on 2.2 the testing instructions don't make sense.

          Show
          Dan Poltawski added a comment - Looks good on master, but on 2.2 the testing instructions don't make sense.
          Hide
          Dan Poltawski added a comment -

          Ah, it was actually me not following the instrucitons properly.

          Show
          Dan Poltawski added a comment - Ah, it was actually me not following the instrucitons properly.
          Hide
          Mark Nelson added a comment -

          Hi Dan, appreciate you doing this for me. Computer is up and running now, and hope it still will be next week when testing comes round.

          Show
          Mark Nelson added a comment - Hi Dan, appreciate you doing this for me. Computer is up and running now, and hope it still will be next week when testing comes round.
          Hide
          Dan Poltawski added a comment -

          Np at all Mark

          Show
          Dan Poltawski added a comment - Np at all Mark
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Closing as fixed, many thanks for your awesome collaboration.

          Show
          Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your awesome collaboration.
          Hide
          Barbara Taylor added a comment -

          Eloy - we installed 2.3.+ to our development server, tested this with an old assignment and with a newly created assignment. When we hide the assignments they are also hidden in the grade book. We open the eye to the item in the grade book. The grades are still hidden from the students in their view. What are we missing?

          Thank you.

          Show
          Barbara Taylor added a comment - Eloy - we installed 2.3.+ to our development server, tested this with an old assignment and with a newly created assignment. When we hide the assignments they are also hidden in the grade book. We open the eye to the item in the grade book. The grades are still hidden from the students in their view. What are we missing? Thank you.
          Hide
          Darko Grabar added a comment -

          Hi, same situation here as in Barbara Taylor case...also Moodle 2.3.2+

          Show
          Darko Grabar added a comment - Hi, same situation here as in Barbara Taylor case...also Moodle 2.3.2+
          Hide
          Elena Ivanova added a comment -

          Hi Barbara and Darko,
          It is marked as fixed for 2.2.3 and 2.3.3. Those versions are not yet released. You can grab development versions, but I would probably wait for a stable release.

          Show
          Elena Ivanova added a comment - Hi Barbara and Darko, It is marked as fixed for 2.2.3 and 2.3.3. Those versions are not yet released. You can grab development versions, but I would probably wait for a stable release.
          Hide
          Barbara Taylor added a comment -

          Thanks Elena. We are anxiously waiting for this fix to get released in an update. Is there an expected date we can tell our instructors?

          Show
          Barbara Taylor added a comment - Thanks Elena. We are anxiously waiting for this fix to get released in an update. Is there an expected date we can tell our instructors?
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Note that the fix is available in all the 2.3.2+ (and 2.2.5+) weekly releases since this was integrated, so should be working if you are using any build >= 20121005 (October 5th).

          Anyway, one regression caused by this has been found, affecting sites with conditional activities enabled (see MDL-35762). That issue is being integrated now and will be available in current weekly (build >= 20121108) and of course will be available in next minor releases next week. So perhaps the best is to wait till next week and get them then.

          Also, please... if something is found not working in closed issues, like this, it's always recommended to create new issues (linked to original) instead of commenting in the closed ones, because they usually are not visited by the developers any more.

          And that's current status. Let's see how it works next week, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Note that the fix is available in all the 2.3.2+ (and 2.2.5+) weekly releases since this was integrated, so should be working if you are using any build >= 20121005 (October 5th). Anyway, one regression caused by this has been found, affecting sites with conditional activities enabled (see MDL-35762 ). That issue is being integrated now and will be available in current weekly (build >= 20121108) and of course will be available in next minor releases next week. So perhaps the best is to wait till next week and get them then. Also, please... if something is found not working in closed issues, like this, it's always recommended to create new issues (linked to original) instead of commenting in the closed ones, because they usually are not visited by the developers any more. And that's current status. Let's see how it works next week, thanks!
          Hide
          Annick Fructoso added a comment -

          We are on 2.4 and still get this issue. Could you please let me know if this bug is fixed for 2.4?
          Thanks!

          Show
          Annick Fructoso added a comment - We are on 2.4 and still get this issue. Could you please let me know if this bug is fixed for 2.4? Thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi Annick, this was fixed before 2.4 release so that version should be fixed.

          Can you verify if, by following the testing instructions above, you can reproduce the problem? If not, surely your problem, although similar, is not exactly the same.

          In any case, could you, please, create a new issue, with the exact steps needed to reproduce it? It really would help the developer to reproduce and, hopefully, fix the problem once and for all.

          TIA, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi Annick, this was fixed before 2.4 release so that version should be fixed. Can you verify if, by following the testing instructions above, you can reproduce the problem? If not, surely your problem, although similar, is not exactly the same. In any case, could you, please, create a new issue, with the exact steps needed to reproduce it? It really would help the developer to reproduce and, hopefully, fix the problem once and for all. TIA, ciao
          Hide
          Jason Neiffer added a comment -

          I can report that this is still an issue in 2.3.x and 2.4.x. It seems like the active bug tracker is here: https://tracker.moodle.org/browse/MDL-35888

          Show
          Jason Neiffer added a comment - I can report that this is still an issue in 2.3.x and 2.4.x. It seems like the active bug tracker is here: https://tracker.moodle.org/browse/MDL-35888

            People

            • Votes:
              29 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: