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

Editing a book's chapter doesn't update timemodified returned by core_course_get_contents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.6, 3.3.3
    • 3.2.5, 3.3.1, 3.4
    • Book
    • MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-60025-master
    • Hide

      How to reproduce:

      1. Create a course with a student user.
      2. Create a book with at least 1 chapter (without images, just text). Please write down the cmid and the sectionid of the book, you will need it later.
      3. Log in as an admin
      4. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      5. Create a Token for the student user.
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, courseid, cmid, sectionid and the URL of your moodle instance.

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=9&options%5B0%5D%5Bname%5D=cmid&options%5B0%5D%5Bvalue%5D=355&options%5B1%5D%5Bname%5D=sectionid&options%5B1%5D%5Bvalue%5D=82&wsfunction=core_course_get_contents&wstoken=413ebb77feed0fde2e612290645df640' --compressed

      7. Please write down the "timemodified" returned by the book's chapter (inside the "contents" property).
      8. Edit the book's chapter and modify the chapter's content. Save the changes.
      9. Perform the REST call again and check that the timemodified has been updated with the timestamp when the chapter was updated.
      Show
      How to reproduce: Create a course with a student user. Create a book with at least 1 chapter (without images, just text). Please write down the cmid and the sectionid of the book, you will need it later. Log in as an admin Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token for the student user. Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user . You need to replace the wstoken, courseid, cmid, sectionid and the URL of your moodle instance. curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=9&options%5B0%5D%5Bname%5D=cmid&options%5B0%5D%5Bvalue%5D=355&options%5B1%5D%5Bname%5D=sectionid&options%5B1%5D%5Bvalue%5D=82&wsfunction=core_course_get_contents&wstoken=413ebb77feed0fde2e612290645df640' --compressed Please write down the " timemodified " returned by the book's chapter (inside the " contents " property). Edit the book's chapter and modify the chapter's content. Save the changes. Perform the REST call again and check that the timemodified has been updated with the timestamp when the chapter was updated.

      Could be related to MDL-40386.

      How to reproduce:

      1. Create a course with a student user.
      2. Create a book with at least 1 chapter. Please write down the cmid and the sectionid of the book, you will need it later.
      3. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      4. Create a Token for the student 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 student user .
        • You need to replace the wstoken, courseid, cmid, sectionid and the URL of your moodle instance.

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=9&options%5B0%5D%5Bname%5D=cmid&options%5B0%5D%5Bvalue%5D=355&options%5B1%5D%5Bname%5D=sectionid&options%5B1%5D%5Bvalue%5D=82&wsfunction=core_course_get_contents&wstoken=413ebb77feed0fde2e612290645df640' --compressed

      1. Please write down the "timemodified" returned by the book's chapter (inside the "contents" property).
      2. Edit the book's chapter and modify the chapter's content. Save the changes.
      3. Perform the REST call again and check that the timemodified hasn't changed.

            jleyva Juan Leyva
            dpalou Dani Palou
            Dani Palou Dani Palou
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ryan Wyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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