MDL-18229 gradebook: Additional fixes.

Random foo left in options. (test code)
Allowed editing link for Course total.
Fixes based on Apu's review.
This commit is contained in:
Zachary Durber
2014-10-14 10:26:46 +08:00
parent 0a55da571a
commit 5f3decb5cb
6 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -816,7 +816,7 @@ class grade_report_grader extends grade_report {
$singleview = '';
if (has_capability('gradereport/singleview:view', $this->context) &&
preg_match('/^item/', $type)) {
!preg_match('/^category/', $type)) {
$url = new moodle_url('/grade/report/singleview/index.php', array(
'id' => $this->course->id,
'item' => 'grade',
@@ -38,11 +38,11 @@ $string['feedbackfor'] = 'Feedback for {$a}';
$string['filtergrades'] = 'Show grades for {$a}.';
$string['gradefor'] = 'Grade for {$a}';
$string['noscreens'] = 'Could not find a suitable Single view screen.';
$string['notallowed'] = 'Not allowed to quick edit this item';
$string['notallowed'] = 'Not allowed to use Singleview on this item.';
$string['notvalid'] = 'Not a valid Single view screen: {$a}';
$string['override'] = 'Override';
$string['overrideall'] = 'Override all grades';
$string['overridefor'] = 'Override for {$a}';
$string['overridenone'] = 'Override no grades';
$string['pluginname'] = 'Single view';
$string['singleview:view'] = 'View the '.$string['pluginname'].' report';
$string['singleview:view'] = 'View report';
+3 -1
View File
@@ -75,7 +75,9 @@ class gradereport_singleview extends grade_report {
}
function process_data($data) {
return $this->screen->process($data);
if (has_capability('moodle/grade:manage', $this->context)) {
return $this->screen->process($data);
}
}
function process_action($target, $action) {
@@ -65,7 +65,6 @@ class gradereport_singleview_grade extends gradereport_singleview_tablelike
}
}, $this->items);
$options['name']= 'foo';
return $options;
}
+1 -1
View File
@@ -113,7 +113,7 @@ class gradereport_singleview_user extends gradereport_singleview_tablelike imple
if (isset($item->cmid)) {
$realuserid = $item->cmid;
}
$url = new moodle_url("/mod/$item->itemmodule/view.php", array('id' => $realuserid));
$url = new moodle_url('/mod/' . $item->itemmodule . '/view.php', array('id' => $realuserid));
$iconstring = get_string('filtergrades', 'gradereport_singleview', $item->get_name());
$grade->label = $item->get_name();
@@ -64,7 +64,7 @@ Feature: We can use Single view
| 12.05 |
| Excluded |
Scenario: Single view quick links work on grade report.
Scenario: Single view links work on grade report.
Given I follow "Single view for Test assignment one"
Then I should see "Test assignment one"
Then I follow "Grader report"