Details
Description
This is to report two issues for mod_glossary.
- It is not possible to rate an exported entry (no rating yet) from secondary glossary to main glossary. An invalid context message is displayed.
- It is not possible to change the rate of an entry (with rating) from secondary glossary once exported to main glossary. An invalid context message is displayed.
Steps to replicate.
- Create a course and enrol a teacher and a student.
- Turn editing mode on.
- Add a Glossary activity.
Name: My secondary glossary
Glossary type: Secondary glossary
Ratings -> Aggregate type: Maximum rating
Scale -> type: Point
Scale -> Maximum grade: 100 - Add another Glossary activity. Just set the following, leave others as default:
Name: My main glossary
Glossary Type: Main glossary - Log as the student. Go to "My secondary glossary".
- Click the "Add a new entry" button.
Concept: This is my first entry.
Definition: Do not export, but grade immediately. - Save changes.
- Log in as the teacher. Go to "My secondary glossary".
- Click the Maximum rating "Rate" drop-down control and select any number (ex. 99)
Result: The rating will be awarded correctly to the first entry. - Log in once again as the student and go to "My secondary glossary".
- Click the "Add a new entry" button.
Concept: This is my second entry.
Definition. Do not grade, export immediately. - Save changes.
- Log in as the teacher again and go to "My secondary glossary".
- Do not grade/rate. Click the "export | export to main glossary" icon for the second entry.
- While still on the "my secondary glossary" page, click the Maximum rating "rate" and select a number. (ex 99)
Result: You will get a popup saying "Invalid context". Click "Ok" button and you will see the error listed in the browser Network tab.
Adding it here on text for reference (screenshot added as well).
{{{ }}
|
|
{{"error":"Invalid context", }}
|
|
{{"errorcode":"invalidcontext", }}
|
|
{{"stacktrace":" }}
|
|
{{* line 772 of \/mod\/glossary\/lib.php: rating_exception thrown}}
|
|
{{* line 7749 of \/lib\/moodlelib.php: call to glossary_rating_validate() }}
|
|
{{* line 7731 of \/lib\/moodlelib.php: call to component_callback()}}
|
|
{{* line 994 of \/rating\/lib.php: call to plugin_callback() }}
|
|
{{* line 1091 of \/rating\/lib.php: call to rating_manager->check_rating_is_valid() }}
|
|
{{* line 66 of \/rating\/rate_ajax.php: call to rating_manager->add_rating() ",}}
|
|
{{"debuginfo":" }}
|
|
{{Error code: invalidcontext",}}
|
|
{{"reproductionlink":"http:\/\/localhost\/moodlevanilla\/"}}
|
|
{{}}}
|