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

Use correct type for properties for user and course summary exporters

    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. Login as admin
      2. Go to Site administration ► Users ► Permissions ► User policies
      3. Check all the items for Show user identity.
      4. Create a user S1.
      5. Enter appropriate values for Email address, Phone, Mobile phone, Department and Institution.
      6. Set the student's ID number to something like <"iamstudent&'>.
      7. Go to Site administration ► Competencies ► Competency frameworks
      8. Create a competency framework and add competencies to it.
      9. Create a course.
      10. Set the course's ID number to something like <"testidnumber&'>.
      11. Under Course administration, click Competencies.
      12. Add the previously created competencies to the course.
      13. Go to Site administration ► Competencies ► Learning plan templates
      14. Create a learning plan template LP1 and link competencies to it.
      Testing for user_summary_exporter
      1. Navigate back to the list of learning plan templates.
      2. Click the link under the Learning plans column for the LP1.
      3. Expand the user selector field for Select users to create learning plans for and select S1.
        • Confirm that S1's name, ID number, email, phone, mobile are shown.
        • Confirm that the ID number is rendered as <"iamstudent&'> and is unescaped.
      Testing for course_summary_exporter
      1. Edit admin/tool/lp/templates/template_competencies_page.mustache and add

        {{idnumber}}

        to the <a> tag under the

        {{#linkedcourses}}

        block here.

      2. Go back to the list of learning plan templates.
      3. Click on LP1.
      4. Check the list of learning plan competencies and check the Linked courses section.
        • Confirm that the ID number is rendered as <"testidnumber&'> and is unescaped.
      Show
      Setup Login as admin Go to Site administration ► Users ► Permissions ► User policies Check all the items for Show user identity . Create a user S1 . Enter appropriate values for Email address, Phone, Mobile phone, Department and Institution. Set the student's ID number to something like <"iamstudent&'> . Go to Site administration ► Competencies ► Competency frameworks Create a competency framework and add competencies to it. Create a course. Set the course's ID number to something like <"testidnumber&'> . Under Course administration, click Competencies. Add the previously created competencies to the course. Go to Site administration ► Competencies ► Learning plan templates Create a learning plan template LP1 and link competencies to it. Testing for user_summary_exporter Navigate back to the list of learning plan templates. Click the link under the Learning plans column for the LP1. Expand the user selector field for Select users to create learning plans for and select S1. Confirm that S1's name, ID number, email, phone, mobile are shown. Confirm that the ID number is rendered as <"iamstudent&'> and is unescaped. Testing for course_summary_exporter Edit admin/tool/lp/templates/template_competencies_page.mustache and add {{idnumber}} to the <a> tag under the {{#linkedcourses}} block here . Go back to the list of learning plan templates. Click on LP1. Check the list of learning plan competencies and check the Linked courses section. Confirm that the ID number is rendered as <"testidnumber&'> and is unescaped.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54546-master

      Description

      In user_summary_exporter, the following properties have a different types from core_user:

      • 'idnumber' should be PARAM_RAW, instead of PARAM_NOTAGS
      • 'email' should be PARAM_RAW_TRIMMED instead of PARAM_TEXT
        It might be better to use \core_user::get_property_type() to make sure that we get the correct types for the desired properties.

      In course_summary_exporter, 'idnumber' should be PARAM_RAW, instead of PARAM_TEXT

        Attachments

          Activity

            People

            • Assignee:
              jpataleta Jun Pataleta
              Reporter:
              jpataleta Jun Pataleta
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              cameron1729
              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:
              3 Start watching this issue

              Dates

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