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

Add sortorder as public field on core_course_get_courses_by_field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.2
    • 3.2.1
    • Course
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-57990-master
    • Easy
    • Hide

      Prepare the environment:

      1. Create two courses and one user.
      2. Enrol the user to one of the courses as a student.
      3. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings ► Enable web services for mobile devices (or search enablemobilewebservice setting).
      4. Create a Token for the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens.

      Test:

      1. Next, you can do a CURL REST call simulating a WS client with the student 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=ffbe3a3002f235bf9d01fd9369e10b66' --compressed

      2. Confirm that the sortorder field is returned on both courses of the list returned.
      Show
      Prepare the environment: Create two courses and one user. Enrol the user to one of the courses as a student. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings ► Enable web services for mobile devices (or search enablemobilewebservice setting). Create a Token for the student: Click on Site administration ► Plugins ► Web services ► Manage tokens. Test: Next, you can do a CURL REST call simulating a WS client with the student 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=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that the sortorder field is returned on both courses of the list returned.

      Sortorder should be a public field to enable sorting on mobile

        1. screenshot-1.png
          42 kB
          David Mudrák (@mudrd8mz)

            pferre22 Pau Ferrer
            pferre22 Pau Ferrer
            Juan Leyva Juan Leyva
            Dan Poltawski Dan Poltawski
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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