Moodle
  1. Moodle
  2. MDL-12172

print_continue should create a method="get" button, not post

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      34583

      Description

      For example, restore a course. At the end of a backup, there is a continue button that takes you to the newly restored course. When you get there, if you click reload, you get a warning from your browser about repeating a POST. That is wrong.

      I have reviewed all 117 places in the main code where print_continue is called, and I don't think changing it to a GET will break anything.

        Activity

        Hide
        Tim Hunt added a comment -

        I should add that this used to be a continue link before Feb 2005. It was changed in revision 1.364 of weblib.php by Martin D.

        I discussed this with Eloy and Petr on Skype, and they think changing it is probably right, but did not really want to commit themselves.

        I am making the change. If you want it reverted, let me know.

        Show
        Tim Hunt added a comment - I should add that this used to be a continue link before Feb 2005. It was changed in revision 1.364 of weblib.php by Martin D. I discussed this with Eloy and Petr on Skype, and they think changing it is probably right, but did not really want to commit themselves. I am making the change. If you want it reverted, let me know.
        Hide
        Matt Clarkson added a comment -

        This change has broken the continue button after uploading a single assignment submission - the cmid is no longer being submitted.

        In Firefox 2.0 (maybe others) parameters supplied in the action of the form tag seem to get stripped off when the form is submitted via GET - adding these parameters as hidden form fields fixes the problem. I have applied a patch to CVS.

        Show
        Matt Clarkson added a comment - This change has broken the continue button after uploading a single assignment submission - the cmid is no longer being submitted. In Firefox 2.0 (maybe others) parameters supplied in the action of the form tag seem to get stripped off when the form is submitted via GET - adding these parameters as hidden form fields fixes the problem. I have applied a patch to CVS.
        Hide
        Tim Hunt added a comment -

        Drat! that is a rather interesting (if not wrong) interpretation of the spec http://www.w3.org/TR/html401/interact/forms.html#submit-format.

        Anyway, thank you very much for the fix. Looks right to me.

        Show
        Tim Hunt added a comment - Drat! that is a rather interesting (if not wrong) interpretation of the spec http://www.w3.org/TR/html401/interact/forms.html#submit-format . Anyway, thank you very much for the fix. Looks right to me.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: