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

WS core_rating_get_item_ratings returns wrong avatar URLs

XMLWordPrintable

    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-65042-master
    • Hide
      1. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      2. Create a forum and enable ratings with a numeric scale.
      3. As a student, post to the forum and find the ID of the post.
      4. As a teacher, set a profile image and rate the post of the student.
      5. Run the app in docker:

        docker run -p 8100:8100 moodlehq/moodlemobile2:next
        

      6. Wait for the docker command to show:

        [05:42:29]  dev server running: http://localhost:8100/
        [05:42:52]  lint finished in 26.06 s
        

      7. Navigate to http://localhost:8100 in your browser
      8. Login as teacher
      9. Navigate to the forum
      10. Go to the rated post forum and click in the Average of ratings: [..] line
        1. Verify that you correctly see the teacher profile image
      Show
      As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a forum and enable ratings with a numeric scale. As a student, post to the forum and find the ID of the post. As a teacher, set a profile image and rate the post of the student. Run the app in docker: docker run -p 8100:8100 moodlehq/moodlemobile2:next Wait for the docker command to show: [05:42:29] dev server running: http://localhost:8100/ [05:42:52] lint finished in 26.06 s Navigate to http://localhost:8100 in your browser Login as teacher Navigate to the forum Go to the rated post forum and click in the Average of ratings: [..] line Verify that you correctly see the teacher profile image

       Steps to reproduce

      1. Create a forum and enable ratings with a numeric scale. Find the ID of the forum course module.
      2. As a student, post to the forum and find the ID of the post.
      3. As a teacher, set a profile image and rate the post of the student.
      4. Create a web service token for the teacher.
      5. Run (replacing the site URL,, course module id, post id and token):
        curl 'http://site_url/webservice/rest/server.php?moodlewsrestformat=json' --data 'contextlevel=module&instanceid=29&component=mod_forum&ratingarea=post&itemid=20&scaleid=5&sort=timemodified&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=core_rating_get_item_ratings&wstoken=c89cffe18f9becf6479b392cef329ca8' | jq
      6. Look at the "userpictureurl" field returned by the web service, the URL points to the wrong avatar . EXPECTED RESULT: the "userpictureurl" should return the avatar of the teacher.

            jleyva Juan Leyva
            albert.gasset Albert Gasset
            Pau Ferrer Pau Ferrer
            Andrew Lyons Andrew Lyons
            Jennifer Bauzon Jennifer Bauzon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 10 minutes
                2h 10m

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