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

Incorrect return types definitions in external function mod_scorm_external::get_scorm_by_courses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a teacher and a student.
      2. Create a couple of scorms activities, you can upload the sample packages found here https://github.com/moodle/moodle/tree/master/mod/scorm/tests/packages. Hide one of the activities.
      3. Use values different that the defaults for these fields: Display course structure in player (disabled), Display attempt status (entry page only) and Student skip content structure page (always)
      4. Enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the teacher and the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user .
        • You need to replace the wstoken, courseid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_scorm_get_scorms_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338'

          Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output

      7. Confirm that
        • As student you only see the visible scorm activity and all the settings fields except 'updatefreq', 'timemodified', 'options', 'completionstatusrequired', 'completionscorerequired' and 'autocommit'
        • As a teacher you see all the scorm activities and all the settings
      Show
      Create a course with a teacher and a student. Create a couple of scorms activities, you can upload the sample packages found here https://github.com/moodle/moodle/tree/master/mod/scorm/tests/packages . Hide one of the activities. Use values different that the defaults for these fields: Display course structure in player (disabled), Display attempt status (entry page only) and Student skip content structure page (always) Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the teacher and the student: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user . You need to replace the wstoken, courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_scorm_get_scorms_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338' Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output Confirm that As student you only see the visible scorm activity and all the settings fields except 'updatefreq', 'timemodified', 'options', 'completionstatusrequired', 'completionscorerequired' and 'autocommit' As a teacher you see all the scorm activities and all the settings
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52457-master

      Description

      hidetoc, displayattemptstatus and skipview are defined as PARAM_BOOL when they should be PARAM_INT

        Attachments

          Activity

            People

            • Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Dani Palou
              Integrator:
              Andrew Nicols
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/16