Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51709

Gradebook single view has a hard coded name format in grade view

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_310_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-51709-310
    • Pull Master Branch:
      MDL-51709-master
    • Testing Instructions:
      Hide
      1. As admin – with firstname "Admin" and lastname "User", set fullnamedisplay (in admin/settings.php?section=userpolicies) to 'firstname lastname' (or in the example below 'language' which corresponds to the same in english)
        and alternativefullnameformat to 'lastname firstname'.
      2. Add a user to your system with firstname "Sam" and lastname "Student"
      3. Add a course to your system and enrol the student.
      4. Go to the gradebook, View → Single view and choose "Course total".
      5. Verify the table header states User full name.
      6. Verify the student is listed as Student Sam.
      7. Create a new assignment in the course.
      8. Go to 'gradebook -> setup' and from the 'edit' menu for the assignment, select 'edit settings'
      9. Tick 'Locked' and save
      10. Edit again, confirming you see 'Locked' ticked.
      11. Now, go to 'gradebook -> view -> single view' and select the assignment from the select
      12. Verify you see the student's avatar, the name listed as Student Sam and a lock icon between the avatar and name.
      13. Verify that hovering the mouse over the lock results in a 'Grade is locked' tooltip.
      14. Insert an assignment to your course, name it "Test assignment one".
      15. Go to the gradebook, View → Grader report.
      16. Click the edit pen in the table column header "Test assignment one".
      17. Check the "Perform bulk insert" checkbox and set the field "Insert value" to "-1" and click "Save".
      18. Verify it states "The grade entered for Test assignment one for Student Sam is less than the minimum allowed" in the error message.
      Show
      As admin – with firstname "Admin" and lastname "User", set fullnamedisplay (in admin/settings.php?section=userpolicies) to 'firstname lastname' (or in the example below 'language' which corresponds to the same in english) and alternativefullnameformat to 'lastname firstname'. Add a user to your system with firstname "Sam" and lastname "Student" Add a course to your system and enrol the student. Go to the gradebook, View → Single view and choose "Course total". Verify the table header states User full name. Verify the student is listed as Student Sam. Create a new assignment in the course. Go to 'gradebook -> setup' and from the 'edit' menu for the assignment, select 'edit settings' Tick 'Locked' and save Edit again, confirming you see 'Locked' ticked. Now, go to 'gradebook -> view -> single view' and select the assignment from the select Verify you see the student's avatar, the name listed as Student Sam and a lock icon between the avatar and name. Verify that hovering the mouse over the lock results in a 'Grade is locked' tooltip. Insert an assignment to your course, name it "Test assignment one". Go to the gradebook, View → Grader report. Click the edit pen in the table column header "Test assignment one". Check the "Perform bulk insert" checkbox and set the field "Insert value" to "-1" and click "Save". Verify it states "The grade entered for Test assignment one for Student Sam is less than the minimum allowed" in the error message.

      Description

      Go to the single view grader report.
      Notice that the heading for the name is "First name (Alternate name) Surname"
      Name information in the actual table looks incorrect as well.

      grade/report/singleview/classes/local/screen/grade.php function original_headers() is a good place to look.

      ...
      get_string('firstname') . ' (' . get_string('alternatename') . ') ' . get_string('lastname'),
      ...
      

        Attachments

        1. Alternative Name.png
          Alternative Name.png
          386 kB
        2. MDL-51709.png
          MDL-51709.png
          106 kB
        3. MDL-51709-after.png
          MDL-51709-after.png
          300 kB
        4. MDL-51709-take2-after.png
          MDL-51709-take2-after.png
          77 kB

          Issue Links

            Activity

              People

              Assignee:
              lucaboesch Luca Bösch
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Jake Dallimore Jake Dallimore
              Integrator:
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              8 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 40 minutes
                  4h 40m