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

moveto_module() should not modify arguments

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6
    • 2.6
    • Course
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • wip-MDL-41181-master
    • Hide
      1. Create a course with visible and hidden sections and several modules
      2. Try moving the modules within one section, from one section to another, etc
      3. Make sure the module visibility is changed logically, i.e.:
      • when moving from/to visible section - module visibility does not change
      • when moving from visible to hidden section module becomes hidden, when moving it back it restores the previous value of visibility
      1. Repeat with JS (or AJAX) disabled.

      Please note that there is another bug MDL-41227. So please (in AJAX mode):
      a) ignore the fact that eye icon is not changing if the visibility was changed during the move
      b) refresh page between two consecutive actions (move or change visibility) on the same activity

      Show
      Create a course with visible and hidden sections and several modules Try moving the modules within one section, from one section to another, etc Make sure the module visibility is changed logically, i.e.: when moving from/to visible section - module visibility does not change when moving from visible to hidden section module becomes hidden, when moving it back it restores the previous value of visibility Repeat with JS (or AJAX) disabled. Please note that there is another bug MDL-41227 . So please (in AJAX mode): a) ignore the fact that eye icon is not changing if the visibility was changed during the move b) refresh page between two consecutive actions (move or change visibility) on the same activity

      At the moment function moveto_module($mod, $section, $beforemod=NULL) may modify the value of $mod->visible . It is only needed for /course/reset.php to serve AJAX requests to move the module.

      First argument may be an instance of cm_info. In MDL-34397 I'm making all properties of cm_info read-only and this function is the only problem.

      Instead moveto_module may return the new value for module visibility.

      Also to mention that modifying JUST $mod->visible is not correct anyway. Other properties such as $mod->uservisible may be affected by this change as well.

            marina Marina Glancy
            marina Marina Glancy
            Rajesh Taneja Rajesh Taneja
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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