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

Add a ratingarea field to the ratings API

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.1
    • Component/s: Ratings
    • Labels:
    • Testing Instructions:
      Hide

      These changes should be backwards compatible and there are no components within Moodle yet that implement this new field (the modules and plugins replacement will be the first).

      To test this you should make sure that it hasn't broken any areas of Moodle that use ratings so you should test Forum, Glossary, and Data.
      When testing you should test with both JavaScript enabled and disabled and just make sure you can rate, change your rating and that it is shown in the gradebook correctly.

      Test routine:

      1. Log in as a teacher and enter a course
      2. Add a new forum, set a scale and set to average ratings.
      3. Add a new glossary, set a scale and set to average ratings.
      4. Add a new database, set a scale and set to average ratings.
      5. Log out.
      6. Log back in as a student.
      7. Enter the course.
      8. Post a couple of times in the forum
      9. Create a couple of glossary entries.
      10. Create a couple of database entries.
      11. Log out.
      12. Log in as the teacher again
      13. Repeat the following with JS enabled and then JS disabled.
      14. Enter the forum and rate the students posts
      15. Change your ratings
      16. Remove your rating (choose the first option)
      17. Give them a rating again
      18. Enter the glossary and do the same for the students entries
      19. Enter the database and do the same for the students entries
      20. Go to the gradebook and make sure the studen's graded items show up correctly.

      Other required tests:

      • Restore one 2.x backup file generated before this week, containing rates and verify that those rates continue being displayed/handled properly.
      • When you create your database activity and have added fields head to the templates tab and make sure for each template type the default is loaded and that you don't get fatal errors on those pages.
      • Search some forum posts and make sure that the parent link and discussion link (see this post in context) still works.
      • Delete a glossary entry and make sure you don't get any errors about ratings.

      Cheers
      Sam

      Note: This is destined for 2.1 - you only need to test the master branch.

      Show
      These changes should be backwards compatible and there are no components within Moodle yet that implement this new field (the modules and plugins replacement will be the first). To test this you should make sure that it hasn't broken any areas of Moodle that use ratings so you should test Forum, Glossary, and Data. When testing you should test with both JavaScript enabled and disabled and just make sure you can rate, change your rating and that it is shown in the gradebook correctly. Test routine: Log in as a teacher and enter a course Add a new forum, set a scale and set to average ratings. Add a new glossary, set a scale and set to average ratings. Add a new database, set a scale and set to average ratings. Log out. Log back in as a student. Enter the course. Post a couple of times in the forum Create a couple of glossary entries. Create a couple of database entries. Log out. Log in as the teacher again Repeat the following with JS enabled and then JS disabled. Enter the forum and rate the students posts Change your ratings Remove your rating (choose the first option) Give them a rating again Enter the glossary and do the same for the students entries Enter the database and do the same for the students entries Go to the gradebook and make sure the studen's graded items show up correctly. Other required tests: Restore one 2.x backup file generated before this week, containing rates and verify that those rates continue being displayed/handled properly. When you create your database activity and have added fields head to the templates tab and make sure for each template type the default is loaded and that you don't get fatal errors on those pages. Search some forum posts and make sure that the parent link and discussion link (see this post in context) still works. Delete a glossary entry and make sure you don't get any errors about ratings. Cheers Sam Note: This is destined for 2.1 - you only need to test the master branch.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:
      wip-MDL-27471-master-revised

      Description

      This change is required by the modules and plugins database replacement currently in development.
      In order to be able to rate several items within the same context+component pairing I need to add a ratingarea field like the files and comments API use.
      This field will be optional NULL in order to not break backwards compatibility with existing items.

      This will be targeted for 2.1

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Jul/11