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

allow HTML tags in the title of Lesson "content pages"

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7
    • 2.0.2, 2.1, 2.2.1, 3.5.3, 3.6
    • Lesson
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_37_STABLE
    • MDL-31852-master
    • Hide

      Moodle 2.2.1+

      File <yourmoodle>mod/lesson/pagetypes/branchtable.php line 310: replace

      $mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
              $mform->setType('title', PARAM_TEXT);

      with

      $mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
      if (!empty($CFG->formatstringstriptags)) {
                  $mform->setType('title', PARAM_TEXT);
              } else {
                  $mform->setType('title', PARAM_CLEANHTML);

      Show
      Moodle 2.2.1+ File <yourmoodle>mod/lesson/pagetypes/branchtable.php line 310: replace $mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70)); $mform->setType('title', PARAM_TEXT); with $mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70)); if (!empty($CFG->formatstringstriptags)) { $mform->setType('title', PARAM_TEXT); } else { $mform->setType('title', PARAM_CLEANHTML);
    • Hide

      Case 1

      HTML tags allowed in activity names.

      1. Login as an admin
      2. Change Appearance ► HTML settings ►"Remove HTML tags from all activity names" to disabled.
      3. Goto/create a course
      4. Create a lesson
      5. Create a content page
      6. Enter the title as "<i>Test page</i>" and save
      7. Confirm the page title appears italic on the "Edit / Collapsed" page

      Case 2

      HTML tags NOT allowed

      1. Login as an admin
      2. Change Appearance ► HTML settings ►"Remove HTML tags from all activity names" to enabled.
      3. Confirm the title from Case 1.6 does not appear italic
      4. Add a new content page to the lesson
      5. Enter the title as "<b>Test page</b>" and save
      6. Confirm the page title does not appear bold on the "Edit / Collapsed" page

      NOTE: Repeat both test cases on Essay, Multi-choice, Matching, Numerical, True/False, Short answer questions.

      Show
      Case 1 HTML tags allowed in activity names. Login as an admin Change Appearance ► HTML settings ►"Remove HTML tags from all activity names" to disabled . Goto/create a course Create a lesson Create a content page Enter the title as "<i>Test page</i>" and save Confirm the page title appears italic on the "Edit / Collapsed" page Case 2 HTML tags NOT allowed Login as an admin Change Appearance ► HTML settings ►"Remove HTML tags from all activity names" to  enabled . Confirm the title from Case 1.6 does not appear italic Add a new content page to the lesson Enter the title as "<b>Test page</b>" and save Confirm the page title does not appear bold on the "Edit / Collapsed" page NOTE: Repeat both test cases on Essay, Multi-choice, Matching, Numerical, True/False, Short answer questions.

      In Moodle 2 we have the Appearance ► HTML settings "allow HTML tags in activity and resource names".
      It would be useful if that setting also allowed HTML tags in the title of Lesson "content pages". When those "content pages" are displayed in the left menu, it would make that menu navigable by images alongwith/rather than text. See attached proof of concept screenshot (created in Moodle 2.2.1).
      See Workaround below for a very simple hack.

            peterdias Peter Dias
            rezeau Joseph Rézeau
            Mihail Geshoski Mihail Geshoski
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Janelle Barcega Janelle Barcega
            Votes:
            10 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.