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

Add sortorder as public field on core_course_get_courses_by_field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      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.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-57990-master

      Description

      Sortorder should be a public field to enable sorting on mobile

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

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