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

Unable to reposition blocks on mod/lesson/continue.php page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.1, 2.7.4, 2.8.2
    • Fix Version/s: 2.7.5, 2.8.3
    • Component/s: Blocks, Lesson
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a lesson
        1. Enable "Use default feedback" under Appearance (or add feedback to your questions)
      2. Add two true/false questions
      3. On the lesson view/preview page add a html block, and edit to set:
        1. Title / Content 'Useful info about this lesson'
        2. 'Display on page types' to 'View or preview lesson page'
        3. 'Select pages' to 'Any page matching above'
      4. Attempt the lesson as a student
      5. VERIFY: the html block stays in place during the whole lesson.. i.e.
        1. It is there on the question view page
        2. It is there on the question feedback page
      Show
      Create a lesson Enable "Use default feedback" under Appearance (or add feedback to your questions) Add two true/false questions On the lesson view/preview page add a html block, and edit to set: Title / Content 'Useful info about this lesson' 'Display on page types' to 'View or preview lesson page' 'Select pages' to 'Any page matching above' Attempt the lesson as a student VERIFY: the html block stays in place during the whole lesson .. i.e. It is there on the question view page It is there on the question feedback page
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-43898-master

      Description

      When on the mod/lesson/continue.php page, any attempt to change the position of a block through the block configuration page using the Region setting will fail.

      This is because the database record in mdl_block_positions is set to a page type of "mod-lesson-view", when the page context when visiting the page is "mod-lesson-continue"

      This error is caused by line 172 of mod/lesson/continue.php

      $PAGE->set_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $page->id));

      I'm guessing that the reason for this line is to prevent a user being redirected back to this page after login.

      In order to have a page context that is the same as this URL setting, I propose changing the page context on continue.php to "mod-lesson-view". This fixes the above problem.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                2/Feb/15