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

Add initial Mobile App support to the communication API

XMLWordPrintable

    • MOODLE_404_STABLE
    • MDL-77444-master
    • Hide
      1. As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features
      2. Enable now "communication tools" on Site administration ► Experimental settings
      3. Create a new course enrolling one user as student (student1)
      4. Create a communication chat room in the course by going to the "More" menu and then Communication, selecting "Custom link" as Provider and adding a link to anything (it can be just a webpage) and a name for the room
      5. Create a Token in the mobile app service for student1 on the site (not an admin account)
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Open the console and execute this new curl request, replacing WS_TOKEN with the token you just created and the SITE_URL with yours and COURSE_ID with the id of the course you created.

        curl ‘SITE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_courses_by_field&field=id&value=COURSE_ID&wstoken=WS_TOKEN' | python -m "json.tool"

      7. Confirm that:
        • In the curl request response you see these two fields (communicationroomname and communicationroomurl), and the value matches the configuration values you introduced when creating the room:
      Show
      As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features Enable now "communication tools" on Site administration ► Experimental settings Create a new course enrolling one user as student (student1) Create a communication chat room in the course by going to the "More" menu and then Communication, selecting "Custom link" as Provider and adding a link to anything (it can be just a webpage) and a name for the room Create a Token in the mobile app service for student1 on the site (not an admin account) Click on Site administration ► Plugins ► Web services ► Manage tokens Open the console and execute this new curl request, replacing WS_TOKEN with the token you just created and the SITE_URL with yours and COURSE_ID with the id of the course you created. curl ‘SITE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_courses_by_field&field=id&value=COURSE_ID&wstoken=WS_TOKEN' | python -m "json.tool" Confirm that: In the curl request response you see these two fields (communicationroomname and communicationroomurl), and the value matches the configuration values you introduced when creating the room:

      Return all the required information for the mobile app to be able to display the link to the external messaging system client used by the student/teacher

      The mobile app would need to know just the name and the URL for the communication tool in the courses where is configured.

      It does not make sense to create a new Web Service for this (and force the app to do further WS requests) so we are just returning the link to the communication tool as part of the standard course configurations that the existing core_coure_get_courses_by_field() is returning.

            jleyva Juan Leyva
            matt.porritt@moodle.com Matt Porritt
            Rodrigo Mady Rodrigo Mady
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 44 minutes
                4h 44m

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