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

Special characters are being double-escaped in competencies tree

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide
      Setup
      1. Take note of these special characters: & ' " ¢ £ © € ¥ ® < >
      2. We need a Moodle site with the following:
        • A competency framework with a name and ID number that contains the special characters above
        • One or more competencies with names and ID numbers that contain the special characters above
        • A learning plan templates with a name that contains the special characters above
        • A user learning plan with a name that contains the special characters above
        • Evidence of prior learning with a name that contains the special characters above
      3. And a course with
        • Course competencies
        • At least one activity that supports competencies (i.e. Assignment)
        • One or more enrolled users.
      Navigate to each of the pages listed on the table below and check that the values of the items to be checked are being properly rendered. (i.e. & is not being rendered as &amp;, etc)
      Navigation Path Item Check Remarks
      Site administration ► Competencies ► Competency frameworks admin/tool/lp/competencyframeworks.php List Framework name  
            Framework ID number  
      Site administration ► Competencies ► Competency frameworks ► [ Framework name ] admin/tool/lp/competencies.php Heading Framework name  
          Tree Framework name  
            Competency name  
          Panel Competency name  
          Competency picker dialogue Competency name Edit > "Add cross-referenced competency" to launch dialogue
          Competency rule dialogue Competency name Edit > Competency rule, choose Outcome then select "Points required are met"
      Site administration ► Competencies ► Competency frameworks ► [ Framework name ] ► Add competency admin/tool/lp/editcompetency.php Competency framework Framework name  
          Parent Competency name  
          Competency picker dialogue Framework name Click the pencil icon beside the Parent competency to launch dialogue
            Competency name  
      Site administration ► Competencies ► Learning plan templates admin/tool/lp/learningplans.php List Template name  
      Site administration ► Competencies ► Learning plan templates ► [ Template name ] admin/tool/lp/templatecompetencies.php Heading Template name  
          Competency details Framework name  
            Framework ID number  
            Competency name  
            Competency ID number  
          Competency picker dialogue Framework name Click "Add competencies to learning plan template" to launch dialogue
            Competency name  
      Site administration ► Competencies ► Learning plan templates ►[Cohort number] ► Cohorts synced to this learning plan template admin/tool/lp/template_cohorts.php Heading Template name Click on link below "Cohorts" column in Learning plan templates page.
      Site administration ► Competencies ► Migrate frameworks admin/tool/lpmigrate/frameworks.php Migrate from/to Framework name  
            Competency ID number  
      Courses ► [ Course name ] ► Competencies admin/tool/lp/coursecompetencies.php Competency details Framework name  
            Framework ID number  
            Competency name  
            Competency ID number  
          Competency picker dialogue Framework name Click "Add competencies to course" to launch dialogue
            Competency name  
      Course administration ► Reports ► Competency breakdown report/competency/index.php Competency column Competency name  
            Competency ID number  
      [ Module name ] ► Edit settings course/modedit.php Course competencies selector Competency name Settings page of any activity module that supports competencies (i.e. assignments)
      Users ► [ User name ] ► Learning plans admin/tool/lp/plans.php List User learning plan name  
      Users ► [ User name ] ► Learning plans ► [ Plan name ] admin/tool/lp/plan.php Heading User learning plan name  
          Competencies list Framework name  
            Competency name  
            Competency ID number  
          User competency summary dialogue Framework name  
            Competency name  
            Competency ID number  
          Competency picker dialogue Framework name Click "Add competency" to launch dialogue.
            Competency name  
      Users ► [ User name ] ► Learning plans ► [ Plan name ] ► Edit learning plan admin/tool/lp/editplan.php Heading User learning plan name  
      Users ► [ User name ] ► Learning plans ► Evidence of prior learning admin/tool/lp/user_evidence_list.php List User evidence name  
      Users ► [ User name ] ► Learning plans ► Evidence of prior learning ► [ Evidence name ] admin/tool/lp/user_evidence.php Heading User evidence name  
          Linked competencies Competency name  
          Competency picker dialogue User learning plan name Click "Link competencies"
            Competency name  
      Users ► [ User name ] ► Learning plans ► Evidence of prior learning ► [ Evidence name ] ► Edit evidence admin/tool/lp/user_evidence_edit.php Heading User evidence name  
      Blocks and related pages
      1. Create a learning plan for your user. Make sure to add special characters on the learning plan name.
      2. Set the learning plan's status to active.
      3. Create another learning plan for your user. Make sure to add special characters on the learning plan name.
      4. Go to a user's Evidence of prior learning page.
      5. Select a user evidence that has competencies linked to it.
      6. Click the Edit menu of that user evidence entry and select Send competencies for review.
      7. Create a new Draft user learning plan for another user. Make sure to add special characters to the learning plan name.
      8. After creating the learning plan click Request review under the Status section of the learning plan.
      9. Go to the dashboard and click Customise this page
      10. Under Add a block, select Learning plans to add the learning plans block.
      11. Check the section My plans.
        • Confirm that the user learning plan name is listed as is and is not being escaped.
      12. Check the section Competencies to review.
        • Confirm that the competency names are listed as is and are not being escaped.
      13. Check the section Plans to review.
        • Confirm that the user learning plan names are listed as is and are not being escaped.
      14. Enter http://[your moodle site]/blocks/lp/competencies_to_review.php on your browser.
      15. Check the list of competencies for review.
        • Confirm that the competency names are listed as is and are not being escaped.
      16. Enter http://[your moodle site]/blocks/lp/plans_to_review.php on your browser.
      17. Check the list of user learning plans for review.
        • Confirm that the user learning plan names are listed as is and are not being escaped.
      Show
      Setup Take note of these special characters: & ' " ¢ £ © € ¥ ® < > We need a Moodle site with the following: A competency framework with a name and ID number that contains the special characters above One or more competencies with names and ID numbers that contain the special characters above A learning plan templates with a name that contains the special characters above A user learning plan with a name that contains the special characters above Evidence of prior learning with a name that contains the special characters above And a course with Course competencies At least one activity that supports competencies (i.e. Assignment) One or more enrolled users. Navigate to each of the pages listed on the table below and check that the values of the items to be checked are being properly rendered. (i.e. & is not being rendered as &amp; , etc) Navigation Path Item Check Remarks Site administration ► Competencies ► Competency frameworks admin/tool/lp/competencyframeworks.php List Framework name         Framework ID number   Site administration ► Competencies ► Competency frameworks ► [ Framework name ] admin/tool/lp/competencies.php Heading Framework name       Tree Framework name         Competency name       Panel Competency name       Competency picker dialogue Competency name Edit > "Add cross-referenced competency" to launch dialogue     Competency rule dialogue Competency name Edit > Competency rule, choose Outcome then select "Points required are met" Site administration ► Competencies ► Competency frameworks ► [ Framework name ] ► Add competency admin/tool/lp/editcompetency.php Competency framework Framework name       Parent Competency name       Competency picker dialogue Framework name Click the pencil icon beside the Parent competency to launch dialogue       Competency name   Site administration ► Competencies ► Learning plan templates admin/tool/lp/learningplans.php List Template name   Site administration ► Competencies ► Learning plan templates ► [ Template name ] admin/tool/lp/templatecompetencies.php Heading Template name       Competency details Framework name         Framework ID number         Competency name         Competency ID number       Competency picker dialogue Framework name Click "Add competencies to learning plan template" to launch dialogue       Competency name   Site administration ► Competencies ► Learning plan templates ► [Cohort number] ► Cohorts synced to this learning plan template admin/tool/lp/template_cohorts.php Heading Template name Click on link below "Cohorts" column in Learning plan templates page. Site administration ► Competencies ► Migrate frameworks admin/tool/lpmigrate/frameworks.php Migrate from/to Framework name         Competency ID number   Courses ► [ Course name ] ► Competencies admin/tool/lp/coursecompetencies.php Competency details Framework name         Framework ID number         Competency name         Competency ID number       Competency picker dialogue Framework name Click "Add competencies to course" to launch dialogue       Competency name   Course administration ► Reports ► Competency breakdown report/competency/index.php Competency column Competency name         Competency ID number   [ Module name ] ► Edit settings course/modedit.php Course competencies selector Competency name Settings page of any activity module that supports competencies (i.e. assignments) Users ► [ User name ] ► Learning plans admin/tool/lp/plans.php List User learning plan name   Users ► [ User name ] ► Learning plans ► [ Plan name ] admin/tool/lp/plan.php Heading User learning plan name       Competencies list Framework name         Competency name         Competency ID number       User competency summary dialogue Framework name         Competency name         Competency ID number       Competency picker dialogue Framework name Click "Add competency" to launch dialogue.       Competency name   Users ► [ User name ] ► Learning plans ► [ Plan name ] ► Edit learning plan admin/tool/lp/editplan.php Heading User learning plan name   Users ► [ User name ] ► Learning plans ► Evidence of prior learning admin/tool/lp/user_evidence_list.php List User evidence name   Users ► [ User name ] ► Learning plans ► Evidence of prior learning ► [ Evidence name ] admin/tool/lp/user_evidence.php Heading User evidence name       Linked competencies Competency name       Competency picker dialogue User learning plan name Click "Link competencies"       Competency name   Users ► [ User name ] ► Learning plans ► Evidence of prior learning ► [ Evidence name ] ► Edit evidence admin/tool/lp/user_evidence_edit.php Heading User evidence name   Blocks and related pages Create a learning plan for your user. Make sure to add special characters on the learning plan name. Set the learning plan's status to active. Create another learning plan for your user. Make sure to add special characters on the learning plan name. Go to a user's Evidence of prior learning page. Select a user evidence that has competencies linked to it. Click the Edit menu of that user evidence entry and select Send competencies for review . Create a new Draft user learning plan for another user. Make sure to add special characters to the learning plan name. After creating the learning plan click Request review under the Status section of the learning plan. Go to the dashboard and click Customise this page Under Add a block, select Learning plans to add the learning plans block. Check the section My plans . Confirm that the user learning plan name is listed as is and is not being escaped. Check the section Competencies to review . Confirm that the competency names are listed as is and are not being escaped. Check the section Plans to review . Confirm that the user learning plan names are listed as is and are not being escaped. Enter http://[your moodle site]/blocks/lp/competencies_to_review.php on your browser. Check the list of competencies for review. Confirm that the competency names are listed as is and are not being escaped. Enter http://[your moodle site]/blocks/lp/plans_to_review.php on your browser. Check the list of user learning plans for review. Confirm that the user learning plan names are listed as is and are not being escaped.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54073-master

      Description

      Entering a name for a competency framework or competency that has special characters gets double-escaped when rendered in the competency tree. See screenshot below:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jpataleta Jun Pataleta
                Reporter:
                jpataleta Jun Pataleta
                Peer reviewer:
                Frédéric Massart
                Integrator:
                Andrew Nicols
                Tester:
                Mark Nelson
                Participants:
                Component watchers:
                Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

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