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

Lesson mod uses .label class

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Create a course
      • Add a lesson to your course
      • Create a question of each type (Essay, Matching, Multichoice, Numerical, Shortanswer, true/false)
      • Return to edit lesson (collapsed)
      • Click on each page title
      • Cross check on each page you don't see any 'Tags' labeled questions any more 
      Show
      Create a course Add a lesson to your course Create a question of each type (Essay, Matching, Multichoice, Numerical, Shortanswer, true/false) Return to edit lesson (collapsed) Click on each page title Cross check on each page you don't see any 'Tags' labeled questions any more 
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-58179-master-fix

      Description

      The Lesson mod has some old code that uses the CSS class .label, which clashes with the Bootstrap class of .label. This makes the span look odd in Bootstrap based themes like Clean and Boost.

      As far as I can tell, these classnames (.label and .labelcorrect) have no Lesson specific styles associated with them, so possibly just deleting them from the code is okay. Two examples:

      pagetypes/shortanswer.php
      202:                $cells[] = '<span class="labelcorrect">'.get_string("answer", "lesson")." $i</span>: \n";
      204:                $cells[] = '<span class="label">'.get_string("answer", "lesson")." $i</span>: \n";
      209:                $cells[] = '<span class="labelcorrect">'.get_string("answer", "lesson")." $i</span>: \n";
      

      You can see this by going into a Lesson with at least one page in it and going into the tab Edit and sub-tab Expanded.

      Removing the ":" may also make things look a bit nicer, since the text is right-aligned anyway

        Attachments

        1. update.PNG
          update.PNG
          115 kB
        2. Screen Shot 2017-03-07 at 14.25.00.png
          Screen Shot 2017-03-07 at 14.25.00.png
          229 kB
        3. MDL-58179-after.png
          MDL-58179-after.png
          16 kB
        4. Boost.png
          Boost.png
          31 kB
        5. 2.PNG
          2.PNG
          5 kB

          Activity

            People

            Assignee:
            lucaboesch Luca Bösch
            Reporter:
            bawjaws David Scotson
            Peer reviewer:
            Mihail Geshoski
            Integrator:
            Andrew Nicols
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Bas Brands
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/May/18

                Time Tracking

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