Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2032

Quiz: support a prepareData function so questions can format the data before it's sent

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: Quiz add-on
    • Labels:
    • Testing Instructions:
      Hide
      1. In Moodle web as teacher, create a quiz with an essay question. Don't add any template to the essay.
      2. In the app, disable the Rich Text Editor if it is enabled (Android & browser only). You can do it in App Settings.
      3. Login as a student and attempt the quiz. In the essay question, add some new lines but no HTML code.
      4. Change the quiz page (so the changes are saved) and go back to the page with the essay. Check that now the new lines have been replaced by <br> and the whole text is wrapped in <p>.
      Show
      In Moodle web as teacher, create a quiz with an essay question. Don't add any template to the essay. In the app, disable the Rich Text Editor if it is enabled (Android & browser only). You can do it in App Settings. Login as a student and attempt the quiz. In the essay question, add some new lines but no HTML code. Change the quiz page (so the changes are saved) and go back to the page with the essay. Check that now the new lines have been replaced by <br> and the whole text is wrapped in <p>.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Sprint:
      Moodle Mobile 3.3.0

      Description

      Right now the quiz answers are sent as they are in the form. We should support a prepareData function like we have in assign, so every question can format the data before it's sent. This will allow, for example, replace new lines in essay questions without RTE.

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Pau Ferrer
            Integrator:
            Juan Leyva
            Tester:
            Berta Maroto
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              26/May/17