Moodle
  1. Moodle
  2. MDL-26932

Activity completion checkbox should link to absolute url

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Activity completion
    • Labels:
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16927

      Description

      I suspect this wouldn't cause an error in core Moodle as it currently stands, but we are finding problems (at the OU UK) as we develop the mobile theme work where the activity completion boxes are on a different page to normal.

      Then, because the checkbox form doesn't post to an absolute URL, you get a 404 error.

      The attached patch uses an absolute URL which will cause no problem for current use, but will also be fine for mobile in the future.

        Activity

        Hide
        Sam Marshall added a comment -

        1) I don't seem to be able to download that patch or else it is the wrong file...

        2) Could you set this up for a pull request please i.e. stick it on a branch on your github account? I can file the actual pull request if you don't have access. (note: if you haven't done this before I can help...)

        Show
        Sam Marshall added a comment - 1) I don't seem to be able to download that patch or else it is the wrong file... 2) Could you set this up for a pull request please i.e. stick it on a branch on your github account? I can file the actual pull request if you don't have access. (note: if you haven't done this before I can help...)
        Hide
        Jenny Gray added a comment -

        2) I've never done it before and I don't have a github account. But I probably should learn, and I have another patch that I want to submit, so I'll take you up on that offer of help next time we're both in the office on the same day!

        Show
        Jenny Gray added a comment - 2) I've never done it before and I don't have a github account. But I probably should learn, and I have another patch that I want to submit, so I'll take you up on that offer of help next time we're both in the office on the same day!
        Hide
        Jenny Gray added a comment - - edited

        Doesn't look like I have permission to set up a pull request - though I should probably get it.

        Commit is here: https://github.com/jennymgray/moodle/commit/d5842f7a355349d2b3cb1c24b2884f854931a236
        Branch is MDL-26932 (sorry, didn't realise it needed a wip- on the front)

        So I think the compare url you're after is

        https://github.com/jennymgray/moodle/compare/MOODLE_20_STABLE...MDL-26932

        Show
        Jenny Gray added a comment - - edited Doesn't look like I have permission to set up a pull request - though I should probably get it. Commit is here: https://github.com/jennymgray/moodle/commit/d5842f7a355349d2b3cb1c24b2884f854931a236 Branch is MDL-26932 (sorry, didn't realise it needed a wip- on the front) So I think the compare url you're after is https://github.com/jennymgray/moodle/compare/MOODLE_20_STABLE...MDL-26932
        Hide
        Jenny Gray added a comment -

        Test steps:

        Ensure completion tracking is enabled on the site and on a test course
        Create an activity or resource and ensure that it has manual completion
        Mark the activity as completed
        Mark the activity as incomplete.

        No errors should be displayed even with developer debug level set.

        (The only way to see that the patch does anything is to view the source - search for togglecompletion.php)

        Show
        Jenny Gray added a comment - Test steps: Ensure completion tracking is enabled on the site and on a test course Create an activity or resource and ensure that it has manual completion Mark the activity as completed Mark the activity as incomplete. No errors should be displayed even with developer debug level set. (The only way to see that the patch does anything is to view the source - search for togglecompletion.php)
        Hide
        Helen Foster added a comment -

        This issue is fixed in this week's 2.0.2+. Thanks Jenny.

        Show
        Helen Foster added a comment - This issue is fixed in this week's 2.0.2+. Thanks Jenny.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: