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

New Web Service mod_workshop_get_workshops_by_courses

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide
      1. Create two workshop activities in the same course. One with the default settings including some images in the description and in another rich editor allowing images or media, another one with the default settings but not visible.
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for one teacher and one student enrolled in the course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. 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=18&wsfunction=mod_workshop_get_workshops_by_courses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      5. Confirm that
        • As student you don't see the non-visible workshop but you see the other one. You can see all the workshop configuration fields (from the mdl_workshop table), also, for all the fields related to file editors you can see also the files attached to the file editor (for example, for the intro field you will see an introfiles field containing the attached files).
        • As a teacher you see all the workshops in the course.
      Show
      Create two workshop activities in the same course. One with the default settings including some images in the description and in another rich editor allowing images or media, another one with the default settings but not visible. Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one teacher and one student enrolled in the course: 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=18&wsfunction=mod_workshop_get_workshops_by_courses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Confirm that As student you don't see the non-visible workshop but you see the other one. You can see all the workshop configuration fields (from the mdl_workshop table), also, for all the fields related to file editors you can see also the files attached to the file editor (for example, for the intro field you will see an introfiles field containing the attached files). As a teacher you see all the workshops in the course.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59237-master

      Description

      To retrieve all the workshop in the given courses

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Ryan Wyllie
                Integrator:
                Dan Poltawski
                Tester:
                Jun Pataleta
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17