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

Change access level rating_manager::generate_rating_settings_object($options) from protected to public

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.1.1
    • Ratings
    • MOODLE_21_STABLE

      The generate_rating_settings_object function checks rating permissions and is called by the public rating_manager::get_ratings. But 'get_ratings' does too much and I use instead the rating_manager::get_all_rating_for_items. However, the latter doesn't call the important 'generate_rating_settings_object' which then has to be called directly for which its access level should be changed to public.

      This could probably be achieved by extending rating_manager locally but if there are no risks should better done in the rating_manager class.

      Change line 642 in rating/lib.php

      from:

      protected function generate_rating_settings_object($options) {

      to:

      public function generate_rating_settings_object($options) {

            Unassigned Unassigned
            itamart Itamar Tzadok
            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.