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

Certain HTML tags break courses when used as condition for access

    Details

    • Testing Instructions:
      Hide

      0. Create a new course with completion tracking enabled.
      1. In first week, add a new Label with one paragraph 'Simple text'.
      2. In second week, add a new Assignment with arbitrary name/description. Under 'Restrict access', choose that 'Simple text' must be marked 'Complete'.
      3. In third week, add a new Label with two paragraphs 'Multiple' and then 'Paragraphs'.
      4. In fourth week, add a new Assignment with arbitrary name/description. Under 'Restrict access', choose that 'Multiple paragraphs' must be marked 'Complete'.
      5. As admin, look at the module page with editing on.

      EXPECTED: The restriction display for both Assignments are the same. The following weeks (below all these activities) display correctly.

      6. Still as admin, turn editing off and look at module page.

      EXPECTED: As above.

      7. Enrol a test student account in the course.
      8. Log in as the test student and look at the course.

      EXPECTED: As above.

      Show
      0. Create a new course with completion tracking enabled. 1. In first week, add a new Label with one paragraph 'Simple text'. 2. In second week, add a new Assignment with arbitrary name/description. Under 'Restrict access', choose that 'Simple text' must be marked 'Complete'. 3. In third week, add a new Label with two paragraphs 'Multiple' and then 'Paragraphs'. 4. In fourth week, add a new Assignment with arbitrary name/description. Under 'Restrict access', choose that 'Multiple paragraphs' must be marked 'Complete'. 5. As admin, look at the module page with editing on. EXPECTED: The restriction display for both Assignments are the same. The following weeks (below all these activities) display correctly. 6. Still as admin, turn editing off and look at module page. EXPECTED: As above. 7. Enrol a test student account in the course. 8. Log in as the test student and look at the course. EXPECTED: As above.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-42582-master

      Description

      When enableavailability is enabled, certain html tags in labels can break a course when being used as a dependency.

      An example would be:

      Create a label with the following html and allow students to manually mark it complete:

      <hr />
      <p><strong>Topic 0 completion</strong></p>
      <p>When you have completed the activities above and are ready to continue, tick the checkbox on the right to open the next topic.</p>

      Then in the next topic create an assignment and use that label to restrict access to it. (use it as activity completion condition). It will break the course layout.

      However, if you change the html in the label to:

      <p><strong>Topic 1 completion<br /><br /></strong>Once you have completed updating your profile and uploading a profile photo, tick the checkbox to the right to open the next topic.</p>

      The course will no longer be broken.

      I suspect it has something to do with the <hr /> and multiple <p></p> tags.

      If you need some screen shots let me know.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/Jan/14