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

Suppress HTML font tags in lesson index and report pages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.7, 3.4.4, 3.5, 3.5.1, 3.6, 3.7
    • Fix Version/s: 3.5.6, 3.6.4
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide

      Index text

      1. Create a lesson
      2. Set the Availability - Available from date and the Deadline (make sure that this is in the past).
      3. Create a second lesson.
      4. Under Common module settings set Availability to Hide from students.
      5. On the course page make note of the course id (in the URL)
      6. Go to mod/lesson/index.php?id=4 replace the 4 with the course id.
      7. Check that the deadline for the lesson that you entered is in red text.
      8. Check that the Name for the lesson is dimmed for the lesson that is unavailable.

      Lesson report

      1. Restore the (attached below) backup file into a course.
      2. Take the lesson with a student.
      3. Login as a teacher.
      4. Enter the lesson activity.
      5. Click the "Reports" tab at the top and then click on the Students attempt link.
      6. Check that only the answered questions are not dimmed.
      Show
      Index text Create a lesson Set the Availability - Available from date and the Deadline (make sure that this is in the past). Create a second lesson. Under Common module settings set Availability to Hide from students. On the course page make note of the course id (in the URL) Go to mod/lesson/index.php?id=4 replace the 4 with the course id. Check that the deadline for the lesson that you entered is in red text. Check that the Name for the lesson is dimmed for the lesson that is unavailable. Lesson report Restore the (attached below) backup file into a course. Take the lesson with a student. Login as a teacher. Enter the lesson activity. Click the "Reports" tab at the top and then click on the Students attempt link. Check that only the answered questions are not dimmed.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-62974-master

      Description

      While working on MDL-62761 I noticed that there is an obsolete HTML font tag in mod/lesson/index.php

      $due = "<font color=\"red\">".userdate($lesson->deadline)."</font>";

      This is used to display overdue lesson in  red.

      As the font tag is no more supported in HTML5 we must remove it.

      Such hardcoded color is also very bad for theme customization.

      But this raise the question of how overdue lessons should be displayed.

      I don't know what other activity modules (quiz, assign, ...) do in a similar case.

      Also there is a completely wrong font closing tag in mod/lesson/report.php:

                  $fontstart = "<span class=\"dimmed\">";
                  $fontend = "</font>";

      Here I think it should be enough to just replace the line with

      $fontend = "</span>";

       

       

        Attachments

        1. lesson-dimmed-text.mbz
          4 kB
        2. screenshot-1.png
          screenshot-1.png
          18 kB
        3. screenshot-2.png
          screenshot-2.png
          80 kB

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/19

                  Time Tracking

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