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

Error dialogue on assignment grading page when student's ID number contains special characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      PHPUnit
      1. Run mdk phpunit -r -s mod_assign (if using MDK) or vendor/bin/phpunit --testsuite mod_assign_testsuite.
        • Confirm that there are no error nor failures.
      Manual testing
      1. Login as admin.
      2. Navigate to Site administration ► Users ► Permissions ► User policies.
      3. Check all items in showuseridentity.
      4. Create a user and add special characters to all fields, where appropriate. Try adding characters such as & ' " ¢ £ © € ¥ ® < >. For the user's ID number, try setting it to something like <someid>&idnumber;</someid>.
      5. Create a course with an assignment.
      6. Enrol that user into the course.
      7. Navigate to the assignment and go to the grading form.
        • Confirm that the page renders okay.
        • Confirm that an error dialogue is not being displayed.
      Show
      PHPUnit Run mdk phpunit -r -s mod_assign (if using MDK ) or vendor/bin/phpunit --testsuite mod_assign_testsuite . Confirm that there are no error nor failures. Manual testing Login as admin. Navigate to Site administration ► Users ► Permissions ► User policies. Check all items in showuseridentity . Create a user and add special characters to all fields, where appropriate. Try adding characters such as & ' " ¢ £ © € ¥ ® < > . For the user's ID number, try setting it to something like <someid>&idnumber;</someid> . Create a course with an assignment. Enrol that user into the course. Navigate to the assignment and go to the grading form. Confirm that the page renders okay. Confirm that an error dialogue is not being displayed.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54623-master

      Description

      The following error is being displayed when opening the assignment grading page with a student that has an ID number that contains special characters.

      idnumber => Invalid response value detected: Invalid external api response: the value is "'<99-35517>&"", the server was expecting "notags" typeError code: invalidresponse

      From the error message, it seems that the expected value for the ID number is PARAM_NOTAGS, but I recall that this has been changed to PARAM_RAW in core_user.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16