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

Hidden label dimmed in Edit mode ON but no longer dimmed in normal mode!

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5.3
    • 2.5.1, 2.5.2
    • Course
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • wip-MDL-41676-master
    • Hide
      1. Enable conditional access on site
      2. Create course and enrol teacher and student in it
      3. Create several activities that have name and contents/description
        • visible activity with no access restrictions
        • hidden activity
        • activity with access restrictions that should be displayed dimmed if conditions are not met
        • activity with access restrictions where student has met the requirements
      4. View the course as a teacher in both view and edit mode, make sure that:
        • hidden activity and activities with restricted access are displayed dimmed
        • activities with restricted access have additional CSS class "conditionalhidden" and accessibility text (use firebug to see them)
      5. View the course as a student and make sure that:
        • activities that student can access are not dimmed
        • activities that student can not access are dimmed
        • no additional CSS class ("conditionalhidden") or accessibility text is present even on the activity where student has met requirements
      Show
      Enable conditional access on site Create course and enrol teacher and student in it Create several activities that have name and contents/description visible activity with no access restrictions hidden activity activity with access restrictions that should be displayed dimmed if conditions are not met activity with access restrictions where student has met the requirements View the course as a teacher in both view and edit mode, make sure that: hidden activity and activities with restricted access are displayed dimmed activities with restricted access have additional CSS class "conditionalhidden" and accessibility text (use firebug to see them) View the course as a student and make sure that: activities that student can access are not dimmed activities that student can not access are dimmed no additional CSS class ("conditionalhidden") or accessibility text is present even on the activity where student has met requirements

      Logged in as teacher, Edit mode, create a label.
      Make that label hidden. Its text is dimmed.
      Quit Edit mode.
      Now the label is no longer dimmed!

      Diagnostic:
      See moodle/course/renderer.php, function course_section_cm_text(cm_info $mod, $displayoptions = array())
      especially:

      if ($this->page->user_is_editing()) {
                  // In editing mode, when an item is conditionally hidden from some users
                  // we show it as greyed out.
                  $conditionalhidden = $this->is_cm_conditionally_hidden($mod);
                  $dim = !$mod->visible || $conditionalhidden;
              } else {
                  // When not in editing mode, we only show item as hidden if it is
                  // actually not available to the user
                  $conditionalhidden = false;
                  $dim = !$mod->uservisible;
              }

        1. 24_student.png
          24_student.png
          20 kB
        2. 24_teacher_edit.png
          24_teacher_edit.png
          66 kB
        3. 24_teacher_view.png
          24_teacher_view.png
          48 kB
        4. 25_student.png
          25_student.png
          20 kB
        5. 25_teacher_edit.png
          25_teacher_edit.png
          66 kB
        6. 25_teacher_view.png
          25_teacher_view.png
          49 kB
        7. screenshot-1.jpg
          screenshot-1.jpg
          19 kB

            marina Marina Glancy
            rezeau Joseph Rézeau
            Sam Hemelryk Sam Hemelryk
            David Monllaó David Monllaó
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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