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

Activity completion not working for Book when Navigationstyle set to TOC only

XMLWordPrintable

    • MOODLE_33_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-59785-master
    • Hide
      1. Log in as admin.
      2. Go to a course, or create a new one.
      3. Enable course completion.
      4. Enrol a user on that course as student.
      5. Create 3 books, each book using a different Style of navigation (TOC Only, Images, Text) and all books using the same Activity completion settings: Set Completion tracking to Show activity as complete when conditions are met and mark Student must view this activity to complete it on Require view
      6. Create at least 2 chapters on each book.
      7. Save and return to course.
      8. Log in as the student you enrolled.
      9. Go to the first book, visit the first chapter and go back to course page.
      10. The activity should NOT be marked as completed.
      11. Visit the last page of the book and go back to the course page.
      12. The activity should be marked as completed.
      13. Go to other 2 books and repeat these last steps.
      14. All books must mark activity as completed when the user reaches last page.
      Show
      Log in as admin. Go to a course, or create a new one. Enable course completion. Enrol a user on that course as student. Create 3 books, each book using a different Style of navigation (TOC Only, Images, Text) and all books using the same Activity completion settings: Set Completion tracking to Show activity as complete when conditions are met and mark Student must view this activity to complete it on Require view Create at least 2 chapters on each book. Save and return to course. Log in as the student you enrolled. Go to the first book, visit the first chapter and go back to course page. The activity should NOT be marked as completed. Visit the last page of the book and go back to the course page. The activity should be marked as completed. Go to other 2 books and repeat these last steps. All books must mark activity as completed when the user reaches last page.

      The Activity Completion does not trigger when the book setting Appearance -> Style of Navigation is set to TOC only (Steps to replicate like MDL-45823 + set navstyle).

      This is because it results in a db entry navstyle = 0, so the completion is skipped, where it would normally happen ( "if ($book->navstyle) {..." mod/book/view.php 153 ).

      Suggestion for a fix:
      https://github.com/TobiGa/moodle/blob/book_completion_fix/mod/book/view.php 203-222
      (apply completion logic from book/classes/external.php)

            lameze Simey Lameze
            toga Tobias Garske
            Ankit Agarwal Ankit Agarwal
            Jun Pataleta Jun Pataleta
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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