mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-74282' of https://github.com/paulholden/moodle
This commit is contained in:
commit
0cb0516211
@ -2921,7 +2921,7 @@ abstract class grade_helper {
|
||||
* @return array
|
||||
*/
|
||||
public static function get_plugins_reports($courseid) {
|
||||
global $SITE;
|
||||
global $SITE, $CFG;
|
||||
|
||||
if (self::$gradereports !== null) {
|
||||
return self::$gradereports;
|
||||
@ -2935,6 +2935,11 @@ abstract class grade_helper {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Remove outcomes report if outcomes not enabled.
|
||||
if ($plugin === 'outcomes' && empty($CFG->enableoutcomes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Remove ones we can't see
|
||||
if (!has_capability('gradereport/'.$plugin.':view', $context)) {
|
||||
continue;
|
||||
|
@ -39,6 +39,10 @@ $context = context_course::instance($course->id);
|
||||
|
||||
require_capability('gradereport/outcomes:view', $context);
|
||||
|
||||
if (empty($CFG->enableoutcomes)) {
|
||||
redirect(course_get_url($course), get_string('outcomesdisabled', 'core_grades'));
|
||||
}
|
||||
|
||||
// First make sure we have proper final grades.
|
||||
grade_regrade_final_grades_if_required($course);
|
||||
|
||||
|
@ -71,7 +71,6 @@ Feature: We can enter in grades and view reports from the gradebook
|
||||
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
|
||||
When I navigate to "View > User report" in the course gradebook
|
||||
And the "jump" select box should contain "Grader report"
|
||||
And the "jump" select box should contain "Outcomes report"
|
||||
And the "Select all or one user" select box should contain "All users (1)"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
|
@ -101,7 +101,6 @@ class general_action_bar_test extends advanced_testcase {
|
||||
'View' => [
|
||||
'Grader report',
|
||||
'Grade history',
|
||||
'Outcomes report',
|
||||
'Overview report',
|
||||
'Single view',
|
||||
'User report',
|
||||
@ -152,7 +151,6 @@ class general_action_bar_test extends advanced_testcase {
|
||||
'View' => [
|
||||
'Grader report',
|
||||
'Grade history',
|
||||
'Outcomes report',
|
||||
'Overview report',
|
||||
'Single view',
|
||||
'User report',
|
@ -600,6 +600,7 @@ $string['outcomescoursecustom'] = 'Custom used (no remove)';
|
||||
$string['outcomescoursenotused'] = 'Standard not used';
|
||||
$string['outcomescourseused'] = 'Standard used (no remove)';
|
||||
$string['outcomescustom'] = 'Custom outcomes';
|
||||
$string['outcomesdisabled'] = 'Outcomes are not enabled';
|
||||
$string['outcomeshortname'] = 'Short name';
|
||||
$string['outcomesstandard'] = 'Standard outcomes';
|
||||
$string['outcomesstandardavailable'] = 'Available standard outcomes';
|
||||
|
Loading…
x
Reference in New Issue
Block a user