Moodle
  1. Moodle
  2. MDL-4478

Essay Question Not saving when quiz time runs out

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Rank:
      7707

      Description

      When a quiz reaches the time limit, all question types are saved except the essay questions. They remain blank.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 11 April 2006, 07:53 AM:

        One can actually watch this happen: when the timer gets to zero one can see the editor window being erased and then the form is submitted. I don't know enough javascript to figure out why this would happen, so I am assigning this to Mark in the first instance but I am also copying in Janne, the editor expert.

        From (randy.bonds at northwestu.edu) Tuesday, 11 April 2006, 11:14 PM:

        Is there a new version of the add-on question type that resolves this? Or is it being fixed in the 1.6 release?

        From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 12:01 AM:

        Randy, this should be fixed in Moodle 1.6, but at the moment I don't know what it is causing it.

        From Mark Nielsen (man15 at humboldt.edu) Wednesday, 12 April 2006, 12:57 AM:

        > editor window being erased and then the form is submitted

        This is somewhat normal behavior. I just submitted a forum post in my test site, and it clears the html editor just after the submit button is pushed. But, I did some further testing and found if I have the html editor turned off, then the essay submits just fine when the time runs out. So, perhaps there is a conflict between the timer JavaScript and that of the editor? I'm not sure.

        From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 03:07 AM:

        Janne, it looks like we need your help. Are you reading this?

        From Janne Mikkonen (janne.mikkonen at julmajanne.com) Wednesday, 12 April 2006, 03:26 AM:

        Yep! I'm reading this and it's a sad story. I'm a bit busy elsewhere but the solution could be found in htmlarea's code lines 601 and 651. This is where the submit routine lies. So it needs hard debugging (eg. alerts here and there) so we can see at which point data is lost.

        From Gustav Delius (gwd2 at york.ac.uk) Friday, 5 May 2006, 03:04 AM:

        This was reported again in MDL-5432

        From Martin Dougiamas (martin at moodle.com) Friday, 5 May 2006, 09:44 AM:

        Yu, can you also try to look at this?

        From Yu Zhang (yu at moodle.com) Friday, 5 May 2006, 02:22 PM:

        Hi,

        I think the problem is that when the timer forcefully submit the form, the onsubmit routine written in htmlarea for the parent form is not executed. I am still trying to figure out how.

        Yu

        From Yu Zhang (yu at moodle.com) Friday, 5 May 2006, 02:50 PM:

        I have tried to fix this by adding

        document.forms['responseform'].onsubmit();

        before the response form got submitted. Please test, thanks.

        Yu

        From (randy.bonds at northwestu.edu) Wednesday, 10 May 2006, 12:20 AM:

        Yu,

        That fixed it, the question submitted when time ran out.

        THANK YOU!!!

        From Gustav Delius (gwd2 at york.ac.uk) Thursday, 11 May 2006, 08:26 PM:

        So can this bug be closed?

        From (randy.bonds at northwestu.edu) Thursday, 11 May 2006, 11:24 PM:

        Yes, it can be closed

        From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 16 May 2006, 04:26 AM:

        I have now also added the

        document.responseform.onsubmit();

        to the javascript navigation function in attempt.php

        Show
        Martin Dougiamas added a comment - From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 11 April 2006, 07:53 AM: One can actually watch this happen: when the timer gets to zero one can see the editor window being erased and then the form is submitted. I don't know enough javascript to figure out why this would happen, so I am assigning this to Mark in the first instance but I am also copying in Janne, the editor expert. From (randy.bonds at northwestu.edu) Tuesday, 11 April 2006, 11:14 PM: Is there a new version of the add-on question type that resolves this? Or is it being fixed in the 1.6 release? From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 12:01 AM: Randy, this should be fixed in Moodle 1.6, but at the moment I don't know what it is causing it. From Mark Nielsen (man15 at humboldt.edu) Wednesday, 12 April 2006, 12:57 AM: > editor window being erased and then the form is submitted This is somewhat normal behavior. I just submitted a forum post in my test site, and it clears the html editor just after the submit button is pushed. But, I did some further testing and found if I have the html editor turned off, then the essay submits just fine when the time runs out. So, perhaps there is a conflict between the timer JavaScript and that of the editor? I'm not sure. From Gustav Delius (gwd2 at york.ac.uk) Wednesday, 12 April 2006, 03:07 AM: Janne, it looks like we need your help. Are you reading this? From Janne Mikkonen (janne.mikkonen at julmajanne.com) Wednesday, 12 April 2006, 03:26 AM: Yep! I'm reading this and it's a sad story. I'm a bit busy elsewhere but the solution could be found in htmlarea's code lines 601 and 651. This is where the submit routine lies. So it needs hard debugging (eg. alerts here and there) so we can see at which point data is lost. From Gustav Delius (gwd2 at york.ac.uk) Friday, 5 May 2006, 03:04 AM: This was reported again in MDL-5432 From Martin Dougiamas (martin at moodle.com) Friday, 5 May 2006, 09:44 AM: Yu, can you also try to look at this? From Yu Zhang (yu at moodle.com) Friday, 5 May 2006, 02:22 PM: Hi, I think the problem is that when the timer forcefully submit the form, the onsubmit routine written in htmlarea for the parent form is not executed. I am still trying to figure out how. Yu From Yu Zhang (yu at moodle.com) Friday, 5 May 2006, 02:50 PM: I have tried to fix this by adding document.forms ['responseform'] .onsubmit(); before the response form got submitted. Please test, thanks. Yu From (randy.bonds at northwestu.edu) Wednesday, 10 May 2006, 12:20 AM: Yu, That fixed it, the question submitted when time ran out. THANK YOU!!! From Gustav Delius (gwd2 at york.ac.uk) Thursday, 11 May 2006, 08:26 PM: So can this bug be closed? From (randy.bonds at northwestu.edu) Thursday, 11 May 2006, 11:24 PM: Yes, it can be closed From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 16 May 2006, 04:26 AM: I have now also added the document.responseform.onsubmit(); to the javascript navigation function in attempt.php
        Hide
        Michael Blake added a comment -

        assign to a valid user

        Show
        Michael Blake added a comment - assign to a valid user

          People

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

            Dates

            • Created:
              Updated:
              Resolved: