Moodle Plugins directory: Course ratings | Moodle.org
Course ratings
"Course ratings" plugin allows students to add ratings and reviews to the courses,
and teachers and other users to read them.
The custom course field that stores the average course rating is created automatically.
The course ratings will be displayed in any course listing that displays custom profile
fields, for example, "All courses" page and site home.
The current course rating is also automatically added to each course home page.
Managers are able to permanently delete course reviews that were flagged by users.
By default every student enrolled into a course can leave a rating. It can be configured that only students who completed the course can do it.
There is also an option to allow to enable or disable course ratings for individual courses.
But I could not find any option to rate teachers. Where is the option to rate and teacher? Or How can I rate teachers?
I have just installed the plugin and looks quite well. Thanks for your contribution.
Regards
I have just installed the plugin.... i cant see any ratings... i am using moodle 4.2 version and latest version of plugin. Please guide me all the steps after installing the plugin.
Firstly, I like the plugin and well done for the hard work. Not sure if i am missing something but once rating a course, this can be edited at a later date. I want the course ratings to not be editable after the rating has been made. I have tried defining role as student and looked for disabling the editing but its not available. Is this possible? I can see from your screenshots that i cant see the "Edit" ability. Any help would be appreciated.
We use and like your plugin
But we want improve our accessibility to our moodlesite.
For a further release, is it possible for you to add a better audio description for the stars, scoring and numbers of rates ?
Thanks a lot
After upgrading to Moodle 5.1, the Course Rating plugin may display the star ratings correctly but fail to load the reviews page, throwing the following exception:
Call to undefined function tool_courserating\external_format_text().
Cause:
In recent Moodle versions, the function external_format_text() still exists in the core file lib/externallib.php, but the plugin’s helper.php file runs inside the namespace tool_courserating.
Because of that, PHP tries to resolve the call as tool_courserating\external_format_text() instead of the global \external_format_text() function from the core library, which leads to the error.
Solution:
Edit the file /admin/tool/courserating/classes/helper.php and, just below the line
namespace tool_courserating;, add the following statement:
use function \external_format_text;
Optionally, for full compatibility with Moodle 5.1, you can also include:
global $CFG; require_once($CFG->libdir . '/externallib.php');
Then purge Moodle caches using the CLI command:
php admin/cli/purge_caches.php
After that, reload the course ratings page — reviews will now appear correctly alongside the star ratings.
The begining of the file helper.php should be in this way:
<?php
namespace tool_courserating;
defined('MOODLE_INTERNAL') || die();
use function \external_format_text;
use core_customfield\data_controller;
use core_customfield\field_controller;
use tool_courserating\external\stars_exporter;
// Carga explícita por compatibilidad con Moodle 5.1
global $CFG;
require_once($CFG->libdir . '/externallib.php');
/**
* Additional helper functions
*
* @package tool_courserating
* @copyright 2022 Marina Glancy * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class helper {