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

Restore role mappings form has no label

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing steps:

      1. Login as Admin into a Moodle that has been populated with Users (i.e. use mdk run users)
      2. Use the backup MBZ file (backup-moodle2-course-13-lessontest-20170425-0831.mbz) attached to this report
      3. Go to Site Administration > Courses tab > Restore course
      4. In the Import a backup file page, drag and drop the MBZ file to the File picker and click Restore button
      5. In the Restore as a new course, click on the Miscellaneous radio button and click Continue
      6. In the Restore settings, click Next
      7. In the Course settings, click Next
      8. In the Backup settings, click Perform restore
      9. You should see the Restore role mappings options with correct labels showing (like the screenshot below)
      10. As Admin, go to Site Administration > Users tab > Define roles and edit the Manager, Teacher, or Student roles' shortname (or delete it and recreate it)
      11. Test the backup restoration from Step 2 again to ensure the labels are displayed properly in Step 9.
        • For renamed / recreated roles the label should be displayed still
        • For deleted roles where there are no equivalent alternatives then the label will display "Role mapping undefined for: '{ backup archetype }' archetype".
          • e.g. Role mapping undefined for: 'manager' archetype
             
      Show
      Testing steps: Login as Admin into a Moodle that has been populated with Users (i.e. use mdk run users) Use the backup MBZ file ( backup-moodle2-course-13-lessontest-20170425-0831.mbz ) attached to this report Go to Site Administration > Courses tab > Restore course In the Import a backup file page, drag and drop the MBZ file to the File picker and click Restore button In the Restore as a new course , click on the Miscellaneous radio button and click Continue In the Restore settings , click Next In the Course settings , click Next In the Backup settings , click Perform restore You should see the Restore role mappings options with correct labels showing (like the screenshot below) As Admin, go to Site Administration > Users tab > Define roles and edit the Manager, Teacher, or Student roles' shortname (or delete it and recreate it) Test the backup restoration from Step 2 again to ensure the labels are displayed properly in Step 9. For renamed / recreated roles the label should be displayed still For deleted roles where there are no equivalent alternatives then the label will display "Role mapping undefined for: '{ backup archetype }' archetype". e.g. Role mapping undefined for: 'manager' archetype  
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-58702-master

      Description

      Steps to reproduce:

      1. Restore the attached backup file into 32 with users included
      2. Get to the point in restore process which asks about role mappings

      Expected results:

      The form should have a label which indicates what is being mapped

      Actual results:

      The form label is empty

       Additional technical details:

      The html generated has empty label tag:

      <div class="detail-pair">
            <label class="detail-pair-label" for="detail-pair-value-1"></label>
            <div class="detail-pair-value">
              <select class="select custom-select menumapping1" id="menumapping1" name="mapping1">
                <option selected="selected" value="1">
                  Manager
                </option>
                <option value="3">
                  Teacher
                </option>
                <option value="4">
                  Non-editing teacher
                </option>
                <option value="5">
                  Student
                </option>
                <option value="0">
                  None
                </option>
              </select>
            </div>
          </div>
      

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jul/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h