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

Navigation tree: Grade node is never set to active

XMLWordPrintable

    • MOODLE_33_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-59599-master
    • Hide
      1. Test in Clean and Boost
      2. Login as a teacher
      3. Go to a course you are enrolled in
      4. Open the nav drawer (if not open yet)
      5. Select the menu item "Grades"
      6. See that this menu item is highlighted
      7. Select some other tabs within the grading pages
      8. See that the menu item keeps being highlighted
      9. Select another menu item, e.g "Participants"
      10. See that the "Grades" item is not highlighted anymore
      Show
      Test in Clean and Boost Login as a teacher Go to a course you are enrolled in Open the nav drawer (if not open yet) Select the menu item "Grades" See that this menu item is highlighted Select some other tabs within the grading pages See that the menu item keeps being highlighted Select another menu item, e.g "Participants" See that the "Grades" item is not highlighted anymore

      Hi,

      during styling the nav drawer menu in our Boost child theme, I encountered that the selected nodes will be displayed bold and set to active if a user clicked them except for the grades node.

      This behaviour is not only given in Boost theme but also in Clean theme (and probably in More theme but I did not test this).

      Screenshots for getting an impression of the difference:

      • Boost:
        • Clicked on "Badges"
        • Clicked on "Grades"
      • Clean:
        • Clicked on "Badges"
        • Clicked on "Grades"

      The code shows following differences:

      • Boost:
        • Clicked on "Badges":

          <a class="list-group-item list-group-item-action font-weight-bold" (...) data-key="badgesview" (...) data-isactive="1" (...)>
          

        • Clicked on "Grades":

          <a class="list-group-item list-group-item-action (...) data-key="grades" (...) data-isactive="0" (...)>
          

      The grades node keeps the attribute for data-isactive = 0 and therefore the class font-weight-bold would not been added as the renderer checks for the active status:
      https://github.com/moodle/moodle/blob/master/theme/boost/templates/flat_navigation.mustache#L65

      • Clean:
        • Clicked on "Badges":

          <p class="tree_item hasicon active_tree_node" role="treeitem" tabindex="0" aria-selected="true">(...)</p>
          

        • Clicked on "Grades":

          <p class="tree_item hasicon" role="treeitem" tabindex="0" aria-selected="true">(...)</p>
          

      In Clean the grades node never gets the class "active_tree_node" and so here the displaying will also be different (not bold) to the other clicked nodes.

      Steps to reproduce

      1. Login into Moodle
      2. Create a course
      3. Go into this course
      4. Click in the course navigation on "Badges"
        -> See that the badges page will be loaded and the text "Badges" will be displayed in bold.
      5. Click in the course navigation on "Grades"
      6. -> See that the grades page will be loaded and the text "Grades" will NOT be displayed in bold.

        1. weekly.png
          weekly.png
          52 kB
        2. int.png
          int.png
          50 kB
        3. image-2018-07-12-11-17-00-133.png
          image-2018-07-12-11-17-00-133.png
          169 kB
        4. image-2018-07-11-18-39-13-585.png
          image-2018-07-11-18-39-13-585.png
          158 kB
        5. clesan_badges.png
          clesan_badges.png
          15 kB
        6. clean_grades.png
          clean_grades.png
          15 kB
        7. boost_grades.png
          boost_grades.png
          11 kB
        8. boost_badges.png
          boost_badges.png
          11 kB

            kosswa Kathrin Osswald
            kosswa Kathrin Osswald
            Luca Bösch Luca Bösch
            David Monllaó David Monllaó
            Janelle Barcega Janelle Barcega
            Votes:
            2 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 - 10 minutes
                10m

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