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

Return active filters in core_course_get_courses_by_field

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 3.3
    • 3.2
    • Course, Filters
    • MOODLE_32_STABLE
    • MOODLE_33_STABLE
    • MDL-57392-master
    • Hide
      1. Via the Filters administration page /admin/filters.php, disable some filters and change the default values for some filters from On to Off
      2. Now, in a course, edit the filters and force some filters to On, others to Off and leave others as Default
      3. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      4. Create a Token in the mobile app service for one user:
        • 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, and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_courses_by_field&wstoken=12a2a65aeea2a177055e233f9e303218' | python -m "json.tool"

      6. Check that the returned values for the filters in the course/s where you changed it matches the Moodle web configuration.
        • The localstate field value should be 1 when the filter is On, Value -1 when the filter is Off and value 0 when is Default.
        • The inheritedstate field value should match the global filters settings: 1 when is On by default and 0 when is Off by default
        • Disabled filters are not returned by the WS
      Show
      Via the Filters administration page /admin/filters.php, disable some filters and change the default values for some filters from On to Off Now, in a course, edit the filters and force some filters to On, others to Off and leave others as Default As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one user: 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, and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_course_get_courses_by_field&wstoken=12a2a65aeea2a177055e233f9e303218' | python -m "json.tool" Check that the returned values for the filters in the course/s where you changed it matches the Moodle web configuration. The localstate field value should be 1 when the filter is On, Value -1 when the filter is Off and value 0 when is Default. The inheritedstate field value should match the global filters settings: 1 when is On by default and 0 when is Off by default Disabled filters are not returned by the WS

    Description

      Right now in that WS we are returning the active authentication methods, we should return also the active filters so we can know which filters should we apply in the app for text in that course (mainly for those that requires javascript like Mathjax)

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Ankit Agarwal Ankit Agarwal
              David Monllaó David Monllaó
              Jun Pataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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