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

Convert hardcode tests for label to module_supports()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5
    • 2.2.3, 2.5
    • Libraries
    • MOODLE_22_STABLE, MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • wip-MDL-33774-master
    • Hide

      Hopefully this issue will be integrated together with MDL-37455 and they can be tested together.

      Test 1. Upgrade

      1. BEFORE integrating this issue
      2. Create course with labels in it (or several courses)
      3. Apply commits from this issue
      4. Run upgrade
      5. Make sure that you can view the courses and see all labels

      Test 2.

      1. Create a course in weeks/topics format with at least one label, one folder that is displayed inside the course (see MDL-37455) and one normal module
      2. Add recent activity block
      3. Turn editing on and try different actions on modules - inline edit of the name, hide/show, duplicate, delete. Make sure all works
      4. Make sure recent activity block shows actions on non-inline module only (exception: the delete action on inline folder will be shown)
      5. Login as student, view the first course, do some activities on the course (view, submit assignment, etc.)
      6. Login as admin/teacher, view all available reports on the course, make sure that only activities on non-inline module(s) are shown
      7. Enable filter "activity names"
      8. Create some text in the course where you use all names of existing activities
      9. Make sure that filter auto-link only activities that are not displayed inline
      10. Create a course in social format, add similar 3 activities in the block, turn editing on, make sure editing buttons work
      Show
      Hopefully this issue will be integrated together with MDL-37455 and they can be tested together. Test 1. Upgrade BEFORE integrating this issue Create course with labels in it (or several courses) Apply commits from this issue Run upgrade Make sure that you can view the courses and see all labels Test 2. Create a course in weeks/topics format with at least one label, one folder that is displayed inside the course (see MDL-37455 ) and one normal module Add recent activity block Turn editing on and try different actions on modules - inline edit of the name, hide/show, duplicate, delete. Make sure all works Make sure recent activity block shows actions on non-inline module only (exception: the delete action on inline folder will be shown) Login as student, view the first course, do some activities on the course (view, submit assignment, etc.) Login as admin/teacher, view all available reports on the course, make sure that only activities on non-inline module(s) are shown Enable filter "activity names" Create some text in the course where you use all names of existing activities Make sure that filter auto-link only activities that are not displayed inline Create a course in social format, add similar 3 activities in the block, turn editing on, make sure editing buttons work

      As discovered in MDL-33726, we need to convert hardcoded use of labels:

      grep -r "== [\"']label[\"']" *
       
      course/lib.php:            if ($info[0] == 'label') {     // Labels are ignored in recent activity
      course/lib.php:    if ($mod->modname !== 'label' && $hasmanageactivities && course_ajax_enabled($COURSE)) {
      lib/modinfolib.php:        if ($this->modname === 'label' && $this->content === '') {
      report/log/locallib.php:            if ($mod->mod == "label") {
      report/log/locallib.php:            if ($mod->mod == "label") {

            marina Marina Glancy
            poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            David Monllaó David Monllaó
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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