Moodle

Completion: tickboxes are lost when using Back button

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

(Bug found by our QA staff)

If you tick some completion tickboxes (with AJAX on), they tick instantly in the page. If you then go to another page, and return to the course page by clicking Back in the browser, the new tick values are lost. This could confuse users.

Activity

Hide
Sam Marshall added a comment -

Fixed. The fix technique is as follows:

1) I added a form with a hidden value set to 0 on the course view page (when completion is on).

2) JavaScript sets this value to 1 if you toggle any completion tickbox

3) If the value is 1 when the page first loads, then JS figures you must have used the back button, sets it to 0, and does a reload.

Show
Sam Marshall added a comment - Fixed. The fix technique is as follows: 1) I added a form with a hidden value set to 0 on the course view page (when completion is on). 2) JavaScript sets this value to 1 if you toggle any completion tickbox 3) If the value is 1 when the page first loads, then JS figures you must have used the back button, sets it to 0, and does a reload.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: