Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71251

Quiz essay: new min/max count limits not returned in WebServices

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.11
    • 3.10.3
    • Quiz
    • MOODLE_310_STABLE
    • MOODLE_311_STABLE
    • MDL-71251-master
    • Hide
      1. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      2. Create a new course and enrol a user (u1) as student
      3. Create a new quiz in the course using the default configuration except: Layout -> New page -> Every two questions
      4. Add two questions to the quiz:
        • 1: Essay configured to use "HTML Editor" as response format, "Allow attachments" set to NO
        • 2: Essay configured to use "HTML Editor" as response format, "Allow attachments" set to YES and "Minimum word limit" set to 32 and "Maximum word limit" set to 128
      5. Access with the student user u1 to the site, go to the course and open the quiz starting an attempt
      6. In the browser URL you will see an URL like this: mod/quiz/attempt.php?attempt=X&cmid=Y. You have to copy the X value somewhere because you will use it later
      7. Create a Token in the mobile app service for the user1 in the site (not an admin account)
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      8. Open the console an execute this new curl request, replacing wstoken with the token you just created and the site url with yours. the ATTEMPT_ID value has to be replaced with the attempt value (the X value) you annotated before

        curl 'http://SITE_URL/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=mod_quiz_get_attempt_data' --data 'attemptid=ATTEMPT_ID&page=0&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=mod_quiz_get_attempt_data&wstoken=WSTOKEN' --compressed

      9. Confirm that:
        • In the curl request response (that is huge) you will see that TWO questions are returned
        • In the first question, the settings->minwordlimit and maxwordlimit are empty/null
        • In the second question, the settings->minwordlimit and maxwordlimit are set to 32 and 128
      Show
      As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a new course and enrol a user (u1) as student Create a new quiz in the course using the default configuration except: Layout -> New page -> Every two questions Add two questions to the quiz: 1: Essay configured to use "HTML Editor" as response format, "Allow attachments" set to NO 2: Essay configured to use "HTML Editor" as response format, "Allow attachments" set to YES and "Minimum word limit" set to 32 and "Maximum word limit" set to 128 Access with the student user u1 to the site, go to the course and open the quiz starting an attempt In the browser URL you will see an URL like this: mod/quiz/attempt.php?attempt=X&cmid=Y. You have to copy the X value somewhere because you will use it later Create a Token in the mobile app service for the user1 in the site (not an admin account) Click on Site administration ► Plugins ► Web services ► Manage tokens Open the console an execute this new curl request, replacing wstoken with the token you just created and the site url with yours. the ATTEMPT_ID value has to be replaced with the attempt value (the X value) you annotated before curl 'http://SITE_URL/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=mod_quiz_get_attempt_data' --data 'attemptid=ATTEMPT_ID&page=0&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=mod_quiz_get_attempt_data&wstoken=WSTOKEN' --compressed Confirm that: In the curl request response (that is huge) you will see that TWO questions are returned In the first question, the settings->minwordlimit and maxwordlimit are empty/null In the second question, the settings->minwordlimit and maxwordlimit are set to 32 and 128

    Description

      These new settings introduced in MDL-68597 aren't returned in the WebServices. This means we cannot support it in the app in offline.

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              dpalou Dani Palou
              Dani Palou Dani Palou
              Jake Dallimore Jake Dallimore
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.