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

mod_check_updates should work based on the user capabilities

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. In a course create an assignment, feedback activity (with one question), database (with one entry), lesson (with one page) and quiz
      2. As student, attempt those activities: submit an assignment, complete a feedback
      3. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      4. Create a Token in the mobile app service for one teacher user in the course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken, the course id, the since with a timestamp value from a day ago and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=17&since=1476274596&wsfunction=core_course_get_updates_since&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' | python -m "json.tool"

      6. Confirm that you receive updates for all the activities where the student did something
      Show
      In a course create an assignment, feedback activity (with one question), database (with one entry), lesson (with one page) and quiz As student, attempt those activities: submit an assignment, complete a feedback As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one teacher user in the course: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user. You need to replace the wstoken, the course id, the since with a timestamp value from a day ago and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=17&since=1476274596&wsfunction=core_course_get_updates_since&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' | python -m "json.tool" Confirm that you receive updates for all the activities where the student did something
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57411-master

      Description

      If the user is a teacher/manager/admin we should return updates information that is useful for him, for example:

      • Quiz: We should report new user attempts/grades
      • Assignment: Same for assignment but for new submissions or grades

      We should add new "areas" or update the existing ones

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17