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

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0
    • 3.0.2
    • SCORM
    • MOODLE_30_STABLE
    • MOODLE_30_STABLE
    • MDL-52457-master
    • 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

    Description

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

      Attachments

        Activity

          People

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Andrew Lyons Andrew Lyons
            Rajesh Taneja Rajesh Taneja
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/16