MDL-23071 standardising gradebook plugin names
AMOS BEGIN MOV [modulename,gradeimport_csv],[pluginname,gradeimport_csv] MOV [modulename,gradeimport_xml],[pluginname,gradeimport_xml] MOV [modulename,gradeexport_ods],[pluginname,gradeexport_ods] MOV [modulename,gradeexport_txt],[pluginname,gradeexport_txt] MOV [modulename,gradeexport_xls],[pluginname,gradeexport_xls] MOV [modulename,gradeexport_xml],[pluginname,gradeexport_xml] MOV [modulename,gradereport_grader],[pluginname,gradereport_grader] MOV [modulename,gradereport_outcomes],[pluginname,gradereport_outcomes] MOV [modulename,gradereport_overview],[pluginname,gradereport_overview] MOV [modulename,gradereport_user],[pluginname,gradereport_user] AMOS END
This commit is contained in:
@@ -175,7 +175,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
foreach (get_plugin_list('gradereport') as $plugin => $plugindir) {
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
if (file_exists($plugindir.'/settings.php')) {
|
||||
$settings = new admin_settingpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin), 'moodle/grade:manage');
|
||||
$settings = new admin_settingpage('gradereport'.$plugin, get_string('pluginname', 'gradereport_'.$plugin), 'moodle/grade:manage');
|
||||
if ($ADMIN->fulltree) {
|
||||
include($plugindir.'/settings.php');
|
||||
}
|
||||
@@ -189,7 +189,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
if (file_exists($plugindir.'/settings.php')) {
|
||||
$settings = new admin_settingpage('gradeimport'.$plugin, get_string('modulename', 'gradeimport_'.$plugin), 'moodle/grade:manage');
|
||||
$settings = new admin_settingpage('gradeimport'.$plugin, get_string('pluginname', 'gradeimport_'.$plugin), 'moodle/grade:manage');
|
||||
if ($ADMIN->fulltree) {
|
||||
include($plugindir.'/settings.php');
|
||||
}
|
||||
@@ -203,7 +203,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
|
||||
foreach (get_plugin_list('gradeexport') as $plugin => $plugindir) {
|
||||
// Include all the settings commands for this plugin if there are any
|
||||
if (file_exists($plugindir.'/settings.php')) {
|
||||
$settings = new admin_settingpage('gradeexport'.$plugin, get_string('modulename', 'gradeexport_'.$plugin), 'moodle/grade:manage');
|
||||
$settings = new admin_settingpage('gradeexport'.$plugin, get_string('pluginname', 'gradeexport_'.$plugin), 'moodle/grade:manage');
|
||||
if ($ADMIN->fulltree) {
|
||||
include($plugindir.'/settings.php');
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class course_settings_form extends moodleform {
|
||||
require_once($plugindir.'/lib.php');
|
||||
$functionname = 'grade_'.$type.'_'.$plugin.'_settings_definition';
|
||||
if (function_exists($functionname)) {
|
||||
$mform->addElement('header', 'grade_'.$type.$plugin, get_string('modulename', 'grade'.$type.'_'.$plugin, NULL));
|
||||
$mform->addElement('header', 'grade_'.$type.$plugin, get_string('pluginname', 'grade'.$type.'_'.$plugin, NULL));
|
||||
if ($can_view_admin_links) {
|
||||
$link = '<a href="' . $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=gradereport' . $plugin . '">' . $strchangedefaults . '</a>';
|
||||
$mform->addElement('static', 'gradeitemsettingslink', null, $link);
|
||||
|
||||
@@ -33,7 +33,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
|
||||
require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/ods:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_ods'));
|
||||
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_ods'));
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/ods:publish', $context);
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'OpenDocument spreadsheet';
|
||||
$string['pluginname'] = 'OpenDocument spreadsheet';
|
||||
$string['ods:publish'] = 'Publish ODS grade export';
|
||||
$string['ods:view'] = 'Use OpenDocument grade export';
|
||||
|
||||
@@ -33,7 +33,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
|
||||
require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/txt:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_txt'));
|
||||
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_txt'));
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/txt:publish', $context);
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'Plain text file';
|
||||
$string['pluginname'] = 'Plain text file';
|
||||
$string['txt:publish'] = 'Publish TXT grade export';
|
||||
$string['txt:view'] = 'Use text grade export';
|
||||
|
||||
@@ -33,7 +33,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
|
||||
require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xls:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_xls'));
|
||||
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'));
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xls:publish', $context);
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'Excel spreadsheet';
|
||||
$string['pluginname'] = 'Excel spreadsheet';
|
||||
$string['xls:publish'] = 'Publish XLS grade export';
|
||||
$string['xls:view'] = 'Use Excel grade export';
|
||||
|
||||
@@ -33,7 +33,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
|
||||
require_capability('moodle/grade:export', $context);
|
||||
require_capability('gradeexport/xml:view', $context);
|
||||
|
||||
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_xml'));
|
||||
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xml'));
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeexport/xml:publish', $context);
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'XML file';
|
||||
$string['pluginname'] = 'XML file';
|
||||
$string['xml:publish'] = 'Publish XML grade export';
|
||||
$string['xml:view'] = 'Use XML grade export';
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
*/
|
||||
|
||||
$string['csv:view'] = 'Import grades from CSV';
|
||||
$string['modulename'] = 'CSV file';
|
||||
$string['pluginname'] = 'CSV file';
|
||||
|
||||
@@ -35,7 +35,7 @@ require_capability('gradeimport/xml:view', $context);
|
||||
|
||||
// print header
|
||||
$strgrades = get_string('grades', 'grades');
|
||||
$actionstr = get_string('modulename', 'gradeimport_xml');
|
||||
$actionstr = get_string('pluginname', 'gradeimport_xml');
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$CFG->gradepublishing = has_capability('gradeimport/xml:publish', $context);
|
||||
|
||||
@@ -31,6 +31,6 @@ $string['errincorrectidnumber'] = 'Error - incorrect idnumber';
|
||||
$string['errincorrectuseridnumber'] = 'Error - idnumber \'{$a}\' from the import file does not match any user.';
|
||||
$string['error'] = 'Errors occur';
|
||||
$string['fileurl'] = 'Remote file URL';
|
||||
$string['modulename'] = 'XML file';
|
||||
$string['pluginname'] = 'XML file';
|
||||
$string['xml:publish'] = 'Publish import grades from XML';
|
||||
$string['xml:view'] = 'Import grades from XML';
|
||||
|
||||
+6
-6
@@ -954,7 +954,7 @@ function grade_build_nav($path, $pagename=null, $id=null) {
|
||||
break;
|
||||
case 4:
|
||||
if ($path_elements[2] == 'grader' AND $path_elements[3] != 'index.php') {
|
||||
$PAGE->navbar->add(get_string('modulename', 'gradereport_grader'), new moodle_url('/grade/report/grader/index.php', $linkparams));
|
||||
$PAGE->navbar->add(get_string('pluginname', 'gradereport_grader'), new moodle_url('/grade/report/grader/index.php', $linkparams));
|
||||
}
|
||||
$PAGE->navbar->add($pagename);
|
||||
break;
|
||||
@@ -1024,7 +1024,7 @@ class grade_structure {
|
||||
}
|
||||
|
||||
} else if ($element['object']->itemtype == 'mod') {
|
||||
$strmodname = get_string('modulename', $element['object']->itemmodule);
|
||||
$strmodname = get_string('pluginname', $element['object']->itemmodule);
|
||||
return '<img src="'.$OUTPUT->pix_url('icon',
|
||||
$element['object']->itemmodule) . '" ' .
|
||||
'class="icon itemicon" title="' .s($strmodname).
|
||||
@@ -1091,7 +1091,7 @@ class grade_structure {
|
||||
if ($withlink and $itemtype=='mod' and $iteminstance and $itemmodule) {
|
||||
if ($cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {
|
||||
|
||||
$a->name = get_string('modulename', $element['object']->itemmodule);
|
||||
$a->name = get_string('pluginname', $element['object']->itemmodule);
|
||||
$title = get_string('linktoactivity', 'grades', $a);
|
||||
$dir = $CFG->dirroot.'/mod/'.$itemmodule;
|
||||
|
||||
@@ -2219,7 +2219,7 @@ abstract class grade_helper {
|
||||
continue;
|
||||
}
|
||||
|
||||
$pluginstr = get_string('modulename', 'gradereport_'.$plugin);
|
||||
$pluginstr = get_string('pluginname', 'gradereport_'.$plugin);
|
||||
$url = new moodle_url('/grade/report/'.$plugin.'/index.php', array('id'=>$courseid));
|
||||
$gradereports[$plugin] = new grade_plugin_info($plugin, $url, $pluginstr);
|
||||
|
||||
@@ -2367,7 +2367,7 @@ abstract class grade_helper {
|
||||
if (!has_capability('gradeimport/'.$plugin.':view', $context)) {
|
||||
continue;
|
||||
}
|
||||
$pluginstr = get_string('modulename', 'gradeimport_'.$plugin);
|
||||
$pluginstr = get_string('pluginname', 'gradeimport_'.$plugin);
|
||||
$url = new moodle_url('/grade/import/'.$plugin.'/index.php', array('id'=>$courseid));
|
||||
$importplugins[$plugin] = new grade_plugin_info($plugin, $url, $pluginstr);
|
||||
}
|
||||
@@ -2405,7 +2405,7 @@ abstract class grade_helper {
|
||||
if (!has_capability('gradeexport/'.$plugin.':view', $context)) {
|
||||
continue;
|
||||
}
|
||||
$pluginstr = get_string('modulename', 'gradeexport_'.$plugin);
|
||||
$pluginstr = get_string('pluginname', 'gradeexport_'.$plugin);
|
||||
$url = new moodle_url('/grade/export/'.$plugin.'/index.php', array('id'=>$courseid));
|
||||
$exportplugins[$plugin] = new grade_plugin_info($plugin, $url, $pluginstr);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ if (!empty($target) && !empty($action) && confirm_sesskey()) {
|
||||
grade_report_grader::process_action($target, $action);
|
||||
}
|
||||
|
||||
$reportname = get_string('modulename', 'gradereport_grader');
|
||||
$reportname = get_string('pluginname', 'gradereport_grader');
|
||||
|
||||
//Initialise the grader report object that produces the table
|
||||
//the class grade_report_grader_ajax was removed as part of MDL-21562
|
||||
|
||||
@@ -30,5 +30,5 @@ $string['ajaxfieldchanged'] = 'The field you are currently editing has changed,
|
||||
$string['ajaxchoosescale'] = 'Choose';
|
||||
$string['grader:manage'] = 'Manage the grader report';
|
||||
$string['grader:view'] = 'View the grader report';
|
||||
$string['modulename'] = 'Grader report';
|
||||
$string['pluginname'] = 'Grader report';
|
||||
$string['preferences'] = 'Grader report preferences';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
$tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
|
||||
$row[] = new tabobject('graderreport',
|
||||
$CFG->wwwroot.'/grade/report/grader/index.php?id='.$courseid,
|
||||
get_string('modulename', 'gradereport_grader'));
|
||||
get_string('pluginname', 'gradereport_grader'));
|
||||
if (has_capability('moodle/grade:manage',$tabcontext ) ||
|
||||
has_capability('moodle/grade:edit', $tabcontext) ||
|
||||
has_capability('gradereport/grader:view', $tabcontext)) {
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
$string['addoutcome'] = 'Add an outcome';
|
||||
$string['courseoutcomes'] = 'Course outcomes';
|
||||
$string['coursespecoutcome'] = 'Course outcomes';
|
||||
$string['modulename'] = 'Outcomes report';
|
||||
$string['pluginname'] = 'Outcomes report';
|
||||
$string['outcomes:view'] = 'View the outcomes report';
|
||||
$string['usedgradeitem'] = 'Number of grade items';
|
||||
|
||||
@@ -112,7 +112,7 @@ if (has_capability('moodle/grade:viewall', $systemcontext)) { //Admins will see
|
||||
|
||||
} else { // Only show one user's report
|
||||
$report = new grade_report_overview($userid, $gpr, $context);
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('modulename', 'gradereport_overview'). ' - '.fullname($report->user));
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview'). ' - '.fullname($report->user));
|
||||
groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
|
||||
|
||||
if ($user_selector) {
|
||||
@@ -134,7 +134,7 @@ if (has_capability('moodle/grade:viewall', $systemcontext)) { //Admins will see
|
||||
$report = new grade_report_overview($userid, $gpr, $context);
|
||||
|
||||
// print the page
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('modulename', 'gradereport_overview'). ' - '.fullname($report->user));
|
||||
print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview'). ' - '.fullname($report->user));
|
||||
|
||||
if ($report->fill_table()) {
|
||||
echo '<br />'.$report->print_table(true);
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'Overview report';
|
||||
$string['pluginname'] = 'Overview report';
|
||||
$string['overview:view'] = 'View the overview report';
|
||||
|
||||
@@ -108,7 +108,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
||||
while ($userdata = $gui->next_user()) {
|
||||
$user = $userdata->user;
|
||||
$report = new grade_report_user($courseid, $gpr, $context, $user->id);
|
||||
echo $OUTPUT->heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
echo $OUTPUT->heading(get_string('pluginname', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
|
||||
if ($report->fill_table()) {
|
||||
echo '<br />'.$report->print_table(true);
|
||||
@@ -118,7 +118,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
||||
$gui->close();
|
||||
} else { // Only show one user's report
|
||||
$report = new grade_report_user($courseid, $gpr, $context, $userid);
|
||||
print_grade_page_head($courseid, 'report', 'user', get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
print_grade_page_head($courseid, 'report', 'user', get_string('pluginname', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
|
||||
|
||||
if ($user_selector) {
|
||||
@@ -140,7 +140,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
||||
$report = new grade_report_user($courseid, $gpr, $context, $userid);
|
||||
|
||||
// print the page
|
||||
print_grade_page_head($courseid, 'report', 'user', get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
print_grade_page_head($courseid, 'report', 'user', get_string('pluginname', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
|
||||
if ($report->fill_table()) {
|
||||
echo '<br />'.$report->print_table(true);
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['modulename'] = 'User report';
|
||||
$string['pluginname'] = 'User report';
|
||||
$string['user:view'] = 'View your own grade report';
|
||||
|
||||
@@ -497,7 +497,7 @@ function grade_report_user_profilereport($course, $user) {
|
||||
|
||||
// print the page
|
||||
echo '<div class="grade-report-user">'; // css fix to share styles with real report page
|
||||
echo $OUTPUT->heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
echo $OUTPUT->heading(get_string('pluginname', 'gradereport_user'). ' - '.fullname($report->user));
|
||||
|
||||
if ($report->fill_table()) {
|
||||
echo $report->print_table(true);
|
||||
|
||||
Reference in New Issue
Block a user