Moodle
  1. Moodle
  2. MDL-37357

Hidden Ranks are visible from other courses, where Ranks are not hidden, and where student has access to

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 2.3.3, 2.3.4, 2.4.1
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Gradebook, Reports
    • Labels:
    • Testing Instructions:
      Hide

      You'll need a student enrolled in at least two courses. They need to have a grade for both courses.

      One course must have show rank set to show and one must have it set to hide.
      To set show rank go to the gradebook within the course and select Settings > Course from the gradebook navigation.

      Log in as the student and go to a course, go into the gradebook and select the overview report.
      In another tab go into the other course, go into the gradebook and select the overview report.
      Check that ranks are shown or replaced by a dash as appropriate in both tabs.

      As admin edit the course that has show rank turned on and turn it off (set it to hide).
      As the student reload the overview report and check that the show rank column is hidden completely (if no courses are set to show rank the rank column is hidden completely. If it still appears you will need to check any other courses the student is enrolled in).

      Show
      You'll need a student enrolled in at least two courses. They need to have a grade for both courses. One course must have show rank set to show and one must have it set to hide. To set show rank go to the gradebook within the course and select Settings > Course from the gradebook navigation. Log in as the student and go to a course, go into the gradebook and select the overview report. In another tab go into the other course, go into the gradebook and select the overview report. Check that ranks are shown or replaced by a dash as appropriate in both tabs. As admin edit the course that has show rank turned on and turn it off (set it to hide). As the student reload the overview report and check that the show rank column is hidden completely (if no courses are set to show rank the rank column is hidden completely. If it still appears you will need to check any other courses the student is enrolled in).
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull 2.4 Branch:
      MDL-37357_hidden_rank_24
    • Pull Master Branch:
      MDL-37357_hidden_rank
    • Rank:
      46978

      Description

      1. Hide Rank in the first course and then do not hide it in the second
      2. Login as a Student
      3. Go to the second course and click Overview Report
      4. You will see Rank column with ALL ranks from all courses

      It doesn't make sense to hide ranks in one unit but it is still available in another. The display of each unit's ranking should reflect the 'Show rank' setting of that particular unit.

      Some suggestion ...
      •Grades - Overview report should be the same in all units no matter which unit student accesses the page from. (as this is not a unit specific grades but user's specific)
      •Rank for an enrolled unit (listed in the overview report) should only be shown if the setting in that unit is set to Show. Otherwise, display '-' or 'not available'?

      If you need more details, please let us know.

      Wannika
      Monash University

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Thank you for the report. If you (or anyone else) has any further ideas about how you would like this to work or even a possible implementation please post it here.

          Show
          Andrew Davis added a comment - Thank you for the report. If you (or anyone else) has any further ideas about how you would like this to work or even a possible implementation please post it here.
          Hide
          Andrew Davis added a comment -

          Adding testing instructions. I do have a fix for this but due to connectivity issues I may not be able to post it until the 17th.

          Show
          Andrew Davis added a comment - Adding testing instructions. I do have a fix for this but due to connectivity issues I may not be able to post it until the 17th.
          Hide
          Andrew Davis added a comment -

          Adding my fix and putting it up for peer review.

          Show
          Andrew Davis added a comment - Adding my fix and putting it up for peer review.
          Hide
          Frédéric Massart added a comment -

          Hi Andrew, nice patch! The only thing I've noticed is that there could be a whitespace after the colon in the commit message. I also wondered if would consider backporting this? Also, as we all have different coding approchaes, let me share mine . I think I'd have used a flat array of course IDs which have the capability to showrank, and check for empty($showrank) to see if it's enabled, and in_array() to see if the course is in the list. Anyway, this does not affect your logic which looks good. Feel free to push for integration whenever ready!

          Cheers,
          Fred

          [Y] Syntax
          [Y] Output
          [Y] Whitespace
          [-] Language
          [Y] Databases
          [Y] Testing
          [-] Security
          [-] Documentation
          [?] Git
          [Y] Sanity check

          Show
          Frédéric Massart added a comment - Hi Andrew, nice patch! The only thing I've noticed is that there could be a whitespace after the colon in the commit message. I also wondered if would consider backporting this? Also, as we all have different coding approchaes, let me share mine . I think I'd have used a flat array of course IDs which have the capability to showrank, and check for empty($showrank) to see if it's enabled, and in_array() to see if the course is in the list. Anyway, this does not affect your logic which looks good. Feel free to push for integration whenever ready! Cheers, Fred [Y] Syntax [Y] Output [Y] Whitespace [-] Language [Y] Databases [Y] Testing [-] Security [-] Documentation [?] Git [Y] Sanity check
          Hide
          Andrew Davis added a comment -

          I've fixed up the commit message and added 2.3 and 2.4 versions. Submitting for integration.

          Show
          Andrew Davis added a comment - I've fixed up the commit message and added 2.3 and 2.4 versions. Submitting for integration.
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 24 and 23. Thanks Andrew!

          Show
          Dan Poltawski added a comment - Integrated to master, 24 and 23. Thanks Andrew!
          Hide
          David Monllaó added a comment -

          It works as expected, tested in 23 and master.

          There is a related issue, when I check the administration settings 'grade_report_overview_showrank' or 'grade_report_user_showrank' if works as expected, but the 'course grade settings' 'show rank' (in overview report and in user report) have the option 'Default (Hide)' which I suppose should change according to the global settings

          Show
          David Monllaó added a comment - It works as expected, tested in 23 and master. There is a related issue, when I check the administration settings 'grade_report_overview_showrank' or 'grade_report_user_showrank' if works as expected, but the 'course grade settings' 'show rank' (in overview report and in user report) have the option 'Default (Hide)' which I suppose should change according to the global settings
          Hide
          Damyon Wiese added a comment -

          Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone!

          Regards, Damyon

          Show
          Damyon Wiese added a comment - Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone! Regards, Damyon

            People

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

              Dates

              • Created:
                Updated:
                Resolved: