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

Lesson: allow linking to pages inside a lesson

XMLWordPrintable

    • MOODLE_19_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide
      • As a teacher, in acourse, create a lesson with some content pages
      • Preview the lesson and copy the adress of one of the lesson pages, but not the first page of the lesson. It should be something like http://mymoodlewebsite/mod/lesson/view.php?id=xx&pageid=yy
      • as a student enter the course, but don't click on the lesson link or it will ruin the test !
      • paste the link to the lesson page you copied in the navigator adress bar and verify you are directly taken to the right lesson page without any error message been displayed.
      Show
      As a teacher, in acourse, create a lesson with some content pages Preview the lesson and copy the adress of one of the lesson pages, but not the first page of the lesson . It should be something like http://mymoodlewebsite/mod/lesson/view.php?id=xx&pageid=yy as a student enter the course, but don't click on the lesson link or it will ruin the test ! paste the link to the lesson page you copied in the navigator adress bar and verify you are directly taken to the right lesson page without any error message been displayed.

      I'm not sure if this is a bug report or an improvement request

      A client of ours has a Moodle in which they use lessons extensively. They created a sort of table-of-contents from hand, with links to various pages inside of each lesson. http://docs.moodle.org/en/Lesson#Other_unusual_ways_to_link suggests that this should be possible.

      Anyway, they ran into the problem that if you try to link to a page within a lesson, and you haven't previously started this lesson in the traditional way (e.g. by clicking on the link to the lesson activity itself), you get the error message "Error: could not find records".

      For example, there's a link to a page within a lesson:
      .../mod/lesson/view.php?id=154&pageid=329
      But, unless you've already visited .../mod/lesson/view.php?id=154 <-- no pageid parameter, you'll get the error.

      This is because in view.php it looks for a record in the lesson_timer table (also for untimed lessons) when there is a pageid parameter, but it only creates an entry in the lesson_timer table when there is no pageid parameter.

      Attached are two small patch files that provide a fix.

            jmvedrine Jean-Michel Vedrine
            brianking Brian King (Inactive)
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Simey Lameze Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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