From: moodler Date: Mon, 23 Jul 2007 08:13:59 +0000 (+0000) Subject: Various language string fixes for grade reports X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e2008be28740c98e55c5be803d85dc6729097618;p=moodle.git Various language string fixes for grade reports --- diff --git a/grade/export/ods/index.php b/grade/export/ods/index.php index 2431c863c8..f97c15e6d1 100755 --- a/grade/export/ods/index.php +++ b/grade/export/ods/index.php @@ -33,7 +33,7 @@ require_capability('moodle/course:downloadallgrades', get_context_instance(CONTE $course = get_record('course', 'id', $id); $feedback = optional_param('feedback', '', PARAM_ALPHA); $strgrades = get_string('grades', 'grades'); -$actionstr = get_string('exportods', 'grades'); +$actionstr = get_string('modulename', 'gradeexport_ods'); $gradenav = "wwwroot/course/view.php?id=$course->id\">$course->shortname"; $gradenav .= " -> wwwroot/grade/index.php?id=$course->id\">$strgrades"; $gradenav .= " -> $actionstr"; @@ -59,4 +59,4 @@ if (($data = data_submitted()) && confirm_sesskey()) { print_gradeitem_selections($id); print_footer(); -?> \ No newline at end of file +?> diff --git a/grade/export/txt/index.php b/grade/export/txt/index.php index fbc3b2e362..b44626cb99 100755 --- a/grade/export/txt/index.php +++ b/grade/export/txt/index.php @@ -33,7 +33,7 @@ require_capability('moodle/course:downloadallgrades', get_context_instance(CONTE $feedback = optional_param('feedback', '', PARAM_ALPHA); $course = get_record('course', 'id', $id); $strgrades = get_string('grades', 'grades'); -$actionstr = get_string('exporttxt', 'grades'); +$actionstr = get_string('modulename', 'gradeexport_txt'); $gradenav = "wwwroot/course/view.php?id=$course->id\">$course->shortname"; $gradenav .= " -> wwwroot/grade/index.php?id=$course->id\">$strgrades"; $gradenav .= " -> $actionstr"; @@ -63,4 +63,4 @@ $mform = new grade_export_txt_form(qualified_me(), array('id'=>$id)); $mform->display(); print_footer(); -?> \ No newline at end of file +?> diff --git a/grade/export/xls/index.php b/grade/export/xls/index.php index 14fb2023de..5dffbe4ca4 100755 --- a/grade/export/xls/index.php +++ b/grade/export/xls/index.php @@ -34,7 +34,7 @@ $course = get_record('course', 'id', $id); $feedback = optional_param('feedback', '', PARAM_ALPHA); $strgrades = get_string('grades', 'grades'); -$actionstr = get_string('exportxls', 'grades'); +$actionstr = get_string('modulename', 'gradeexport_xls'); $gradenav = "wwwroot/course/view.php?id=$course->id\">$course->shortname"; $gradenav .= " -> wwwroot/grade/index.php?id=$course->id\">$strgrades"; $gradenav .= " -> $actionstr"; @@ -61,4 +61,4 @@ if (($data = data_submitted()) && confirm_sesskey()) { print_gradeitem_selections($id); print_footer(); -?> \ No newline at end of file +?> diff --git a/grade/export/xml/index.php b/grade/export/xml/index.php index 0708c166b1..f6020c975f 100755 --- a/grade/export/xml/index.php +++ b/grade/export/xml/index.php @@ -34,7 +34,7 @@ $course = get_record('course', 'id', $id); $feedback = optional_param('feedback', '', PARAM_ALPHA); $strgrades = get_string('grades', 'grades'); -$actionstr = get_string('exportxml', 'grades'); +$actionstr = get_string('modulename', 'gradeexport_xml'); $gradenav = "wwwroot/course/view.php?id=$course->id\">$course->shortname"; $gradenav .= " -> wwwroot/grade/index.php?id=$course->id\">$strgrades"; $gradenav .= " -> $actionstr"; @@ -61,4 +61,4 @@ if (($data = data_submitted()) && confirm_sesskey()) { print_gradeitem_selections($id); print_footer(); -?> \ No newline at end of file +?> diff --git a/grade/lib.php b/grade/lib.php index 3a138d973a..f967673d5a 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -33,7 +33,7 @@ function print_grade_plugin_selector($courseid, $active_type, $active_plugin, $r if ($active_type == 'report' and $active_plugin == $plugin ) { $active = $url; } - $reportnames[$url] = get_string('modulename', 'gradereport_'.$plugin); + $reportnames[$url] = get_string('modulename', 'gradereport_'.$plugin, NULL, $CFG->dirroot.'/grade/report/'.$plugin.'lang/'); } asort($reportnames); } @@ -43,7 +43,7 @@ function print_grade_plugin_selector($courseid, $active_type, $active_plugin, $r } /// standard import plugins - if ($imports = get_list_of_plugins('grade/import', 'CVS')) { // Get all installed reports + if ($imports = get_list_of_plugins('grade/import', 'CVS')) { // Get all installed import plugins foreach ($imports as $key => $plugin) { // Remove ones we can't see if (!has_capability('gradeimport/'.$plugin.':view', $context)) { unset($imports[$key]); @@ -57,7 +57,7 @@ function print_grade_plugin_selector($courseid, $active_type, $active_plugin, $r if ($active_type == 'impot' and $active_plugin == $plugin ) { $active = $url; } - $importnames[$url] = get_string('modulename', 'gradeimport_'.$plugin); + $importnames[$url] = get_string('modulename', 'gradeimport_'.$plugin, NULL, $CFG->dirroot.'/grade/import/'.$plugin.'lang/'); } asort($importnames); } @@ -67,7 +67,7 @@ function print_grade_plugin_selector($courseid, $active_type, $active_plugin, $r } /// standard export plugins - if ($exports = get_list_of_plugins('grade/export', 'CVS')) { // Get all installed reports + if ($exports = get_list_of_plugins('grade/export', 'CVS')) { // Get all installed export plugins foreach ($exports as $key => $plugin) { // Remove ones we can't see if (!has_capability('gradeexport/'.$plugin.':view', $context)) { unset($exports[$key]); @@ -81,7 +81,7 @@ function print_grade_plugin_selector($courseid, $active_type, $active_plugin, $r if ($active_type == 'impot' and $active_plugin == $plugin ) { $active = $url; } - $exportnames[$url] = get_string('modulename', 'gradeexport_'.$plugin); + $exportnames[$url] = get_string('modulename', 'gradeexport_'.$plugin, NULL, $CFG->dirroot.'/grade/export/'.$plugin.'lang/'); } asort($exportnames); } @@ -291,4 +291,4 @@ class grade_plugin_return { return $url; } } -?> \ No newline at end of file +?> diff --git a/grade/report/grader/index.php b/grade/report/grader/index.php index 35d4a452f2..bdb387a7ec 100644 --- a/grade/report/grader/index.php +++ b/grade/report/grader/index.php @@ -49,8 +49,6 @@ if (!$context = get_context_instance(CONTEXT_COURSE, $report->gtree->courseid)) return false; } -print_heading('Grader Report'); - // Add tabs $currenttab = 'graderreport'; include('tabs.php'); diff --git a/grade/report/grader/preferences.php b/grade/report/grader/preferences.php index 84519dba4d..dc626481dd 100644 --- a/grade/report/grader/preferences.php +++ b/grade/report/grader/preferences.php @@ -25,6 +25,7 @@ set_time_limit(0); require_once '../../../config.php'; require_once $CFG->libdir . '/gradelib.php'; +require_once '../../lib.php'; $courseid = required_param('id', PARAM_INT); @@ -61,7 +62,7 @@ if ($form = data_submitted()) { } $strgrades = get_string('grades'); -$strgraderreport = get_string('graderreport', 'grades'); +$strgraderreport = get_string('modulename', 'gradereport_grader'); $strgradepreferences = get_string('gradepreferences', 'grades'); $navlinks = array(); @@ -74,7 +75,10 @@ $navigation = build_navigation($navlinks); print_header_simple($strgrades.': '.$strgraderreport . ': ' . $strgradepreferences,': '.$strgradepreferences, $navigation, '', '', true, '', navmenu($course)); -print_heading(get_string('preferences')); + +/// Print the plugin selector at the top +print_grade_plugin_selector($course->id, 'report', 'grader'); + // Add tabs $currenttab = 'preferences'; include('tabs.php'); diff --git a/grade/report/grader/tabs.php b/grade/report/grader/tabs.php index 9ee6982999..2f8a192ca9 100644 --- a/grade/report/grader/tabs.php +++ b/grade/report/grader/tabs.php @@ -2,7 +2,7 @@ $row = $tabs = array(); $row[] = new tabobject('graderreport', $CFG->wwwroot.'/grade/report.php?id='.$courseid.'&report=grader', - get_string('graderreport', 'grades')); + get_string('modulename', 'gradereport_grader')); $row[] = new tabobject('preferences', $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid, diff --git a/grade/report/user/index.php b/grade/report/user/index.php index 4e1e893663..24e8844a1a 100644 --- a/grade/report/user/index.php +++ b/grade/report/user/index.php @@ -20,7 +20,7 @@ $gradetotal = 0; $gradesum = 0; // print the page -print_heading(get_string('userreport', 'grades'). " - ".fullname($report->user)); +print_heading(get_string('modulename', 'gradereport_user'). " - ".fullname($report->user)); if ($report->fill_table()) { echo $report->print_table(true); diff --git a/lang/en_utf8/gradereport_grader.php b/lang/en_utf8/gradereport_grader.php index 5388589ea4..42ea331ca8 100644 --- a/lang/en_utf8/gradereport_grader.php +++ b/lang/en_utf8/gradereport_grader.php @@ -1,6 +1,6 @@ diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 0e77c82de3..ecaf46777b 100644 --- a/lang/en_utf8/grades.php +++ b/lang/en_utf8/grades.php @@ -99,10 +99,7 @@ $string['errorreprintheadersnonnumeric'] = 'Received non-numeric value for repri $string['exceptions'] = 'Exceptions'; $string['excluded'] = 'Excluded'; $string['expand'] = 'Expand Category'; -$string['exportods'] = 'Export ODS'; $string['exportplugins'] = 'Export plugins'; -$string['exporttxt'] = 'Export TXT'; -$string['exportxml'] = 'Export XML'; $string['extracredit'] = 'Extra Credit'; $string['extracreditwarning'] = 'Note: Setting all items for a category to extra credit will effectively remove them from the grade calculation. Since there will be no point total'; $string['feedback'] = 'Feedback'; @@ -147,8 +144,6 @@ $string['plusfactor'] = 'Offset'; $string['gradepreferences'] = 'Grade Preferences'; $string['gradepreferenceshelp'] = 'Grade Preferences Help'; $string['grades'] = 'Grades'; -$string['gradereports'] = 'Grades report'; -$string['graderreport'] = 'Grader report'; $string['gradetype'] = 'Grade type'; $string['gradeview'] = 'View Grade'; $string['gradeweighthelp'] = 'Grade Weight Help'; @@ -294,7 +289,6 @@ $string['usenooutcome'] = 'Use no outcome'; $string['usenoscale'] = 'Use no scale'; $string['usepercent'] = 'Use Percent'; $string['userpreferences'] = 'User preferences'; -$string['userreport'] = 'User grade report'; $string['useweighted'] = 'Use Weighted'; $string['viewbygroup'] = 'Group'; $string['viewgrades'] = 'View Grades';