Moodle

Lesson: allow linking to pages inside a lesson

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Lesson
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

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.

Activity

Hide
Brian King added a comment -

Note if you try to reproduce the behavior: This only happens for normal users (e.g. students), not superusers and editing teachers.

Show
Brian King added a comment - Note if you try to reproduce the behavior: This only happens for normal users (e.g. students), not superusers and editing teachers.
Hide
Martin Dougiamas added a comment -

Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.

Show
Martin Dougiamas added a comment - Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.
Hide
Julia added a comment -

This bug still exists in 2.04 !

Show
Julia added a comment - This bug still exists in 2.04 !

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: