]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10210 Updated the admin settings page for the grader report.
authornicolasconnault <nicolasconnault>
Mon, 30 Jul 2007 09:46:01 +0000 (09:46 +0000)
committernicolasconnault <nicolasconnault>
Mon, 30 Jul 2007 09:46:01 +0000 (09:46 +0000)
grade/report/grader/preferences.php
grade/report/grader/preferences_form.php
grade/report/grader/settings.php
lang/en_utf8/grades.php

index 38bdd67b1e83ea37ca529a3181c057aac8085518..611eade4c48f74e95d0614c3ff6040e68d920701 100644 (file)
@@ -79,6 +79,13 @@ print_header_simple($strgrades.': '.$strgraderreport . ': ' . $strgradepreferenc
 /// Print the plugin selector at the top
 print_grade_plugin_selector($course->id, 'report', 'grader');
 
+// If USER has admin capability, print a link to the site config page for this report
+if (has_capability('moodle/site:config')) {
+    echo '<div id="siteconfiglink"><a href="' . $CFG->wwwroot . '/admin/settings.php?section=gradereportgrader">';
+    echo get_string('changesitedefaults', 'grades');
+    echo "</div>\n";
+}
+
 // Add tabs
 $currenttab = 'preferences';
 include('tabs.php');
index f51148f794a2ce5f64d5c7bd46ad0948a1fe2be5..3f449ee631c190166c7681a556c9d319e759769e 100644 (file)
@@ -57,12 +57,12 @@ class grader_report_preferences_form extends moodleform {
                       'enableajax'             => $checkbox_default);
 
         $preferences['prefshow'] = array('showcalculations'       => $checkbox_default,
-                                     'showeyecons'            => $checkbox_default,
-                                     'showaverages'           => $checkbox_default,
-                                     'showgroups'             => $checkbox_default,
-                                     'showlocks'              => $checkbox_default,
-                                     'showranges'             => $checkbox_default,
-                                     'showuserimage'          => $checkbox_default,);
+                                         'showeyecons'            => $checkbox_default,
+                                         'showaverages'           => $checkbox_default,
+                                         'showgroups'             => $checkbox_default,
+                                         'showlocks'              => $checkbox_default,
+                                         'showranges'             => $checkbox_default,
+                                         'showuserimage'          => $checkbox_default,);
 
         $preferences['prefrows'] = array(
                     'averagesdisplaytype'    => array(GRADE_REPORT_PREFERENCE_DEFAULT => 'default',
@@ -118,7 +118,7 @@ class grader_report_preferences_form extends moodleform {
                 if (!is_null($options) AND $options[GRADE_REPORT_PREFERENCE_DEFAULT] == 'default') {
                     $options[GRADE_REPORT_PREFERENCE_DEFAULT] = get_string('sitedefault', 'grades', $default);
                 } elseif ($type == 'text') {
-                    $help_string = get_string("config$lang_string", 'grades', $default);
+                    $help_string = get_string("config{$lang_string}default", 'grades', $default);
                 }
 
                 $label = get_string($lang_string, 'grades') . $number;
index 2876dab6a81b036fbb2e290fd7ef5b61a6bec3a0..118199ef28cae3e6ad670f70abe6062d5a8b6f80 100644 (file)
@@ -10,6 +10,24 @@ $strreal                = get_string('real', 'grades');
 $strletter              = get_string('letter', 'grades');
 
 /// Add settings for this module to the $settings object (it's already defined)
+$settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
+                                        get_string('configstudentsperpage', 'grades'), 20));
+
+$settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
+                                            get_string('configquickgrading', 'grades'), 1));
+
+$settings->add(new admin_setting_configcheckbox('grade_report_quickfeedback', get_string('quickfeedback', 'grades'),
+                                            get_string('configquickfeedback', 'grades'), 1));
+
+$settings->add(new admin_setting_configselect('grade_report_decimalpoints', get_string('decimalpoints', 'grades'),
+                                          get_string('configdecimalpoints', 'grades'), 2,
+                                          array( '0' => '0',
+                                                 '1' => '1',
+                                                 '2' => '2',
+                                                 '3' => '3',
+                                                 '4' => '4',
+                                                 '5' => '5')));
+
 $settings->add(new admin_setting_configselect('grade_report_aggregationposition', get_string('aggregationposition', 'grades'),
                                           get_string('configaggregationposition', 'grades'), false,
                                           array(GRADE_REPORT_AGGREGATION_POSITION_LEFT => get_string('left', 'grades'),
@@ -20,75 +38,55 @@ $settings->add(new admin_setting_configselect('grade_report_aggregationview', ge
                                           array(GRADE_REPORT_AGGREGATION_VIEW_FULL => get_string('full', 'grades'),
                                                 GRADE_REPORT_AGGREGATION_VIEW_COMPACT => get_string('compact', 'grades'))));
 
-$settings->add(new admin_setting_configcheckbox('grade_report_bulkcheckboxes', get_string('bulkcheckboxes', 'grades'),
-                                            get_string('configbulkcheckboxes', 'grades'), 0));
-
-$settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_string('enableajax', 'grades'),
-                                            get_string('configenableajax', 'grades'), 0));
-
 $settings->add(new admin_setting_configselect('grade_report_gradedisplaytype', get_string('gradedisplaytype', 'grades'),
                                           get_string('configgradedisplaytype', 'grades'), false,
                                           array(GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
                                                 GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
                                                 GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
 
-$settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
-                                          get_string('configrangesdisplaytype', 'grades'), false,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
-
-$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
-                                          get_string('configaveragesdisplaytype', 'grades'), false,
-                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
-                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
-
 $settings->add(new admin_setting_configselect('grade_report_meanselection', get_string('meanselection', 'grades'),
                                           get_string('configmeanselection', 'grades'), false,
                                           array(GRADE_AGGREGATE_MEAN_ALL => get_string('meanall', 'grades'),
                                                 GRADE_AGGREGATE_MEAN_GRADED => get_string('meangraded', 'grades'))));
 
+$settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_string('enableajax', 'grades'),
+                                            get_string('configenableajax', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showcalculations', get_string('showcalculations', 'grades'),
                                             get_string('configshowcalculations', 'grades'), 0));
 
 $settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
                                             get_string('configshoweyecons', 'grades'), 0));
 
-$settings->add(new admin_setting_configcheckbox('grade_report_showgroups', get_string('showgroups', 'grades'),
-                                            get_string('configshowgroups', 'grades'), 0));
-
 $settings->add(new admin_setting_configcheckbox('grade_report_showaverages', get_string('showaverages', 'grades'),
                                             get_string('configshowaverages', 'grades'), 0));
 
+$settings->add(new admin_setting_configcheckbox('grade_report_showgroups', get_string('showgroups', 'grades'),
+                                            get_string('configshowgroups', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showlocks', get_string('showlocks', 'grades'),
                                             get_string('configshowlocks', 'grades'), 0));
 
 $settings->add(new admin_setting_configcheckbox('grade_report_showranges', get_string('showranges', 'grades'),
                                             get_string('configshowranges', 'grades'), 0));
 
-$settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
-                                            get_string('configquickgrading', 'grades'), 1));
-
-$settings->add(new admin_setting_configcheckbox('grade_report_quickfeedback', get_string('quickfeedback', 'grades'),
-                                            get_string('configquickfeedback', 'grades'), 1));
-
 $settings->add(new admin_setting_configcheckbox('grade_report_showuserimage', get_string('showuserimage', 'grades'),
                                             get_string('configshowuserimage', 'grades'), 1));
 
-$settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
-                                        get_string('configstudentsperpage', 'grades'), 20));
+$settings->add(new admin_setting_configselect('grade_report_averagesdisplaytype', get_string('averagesdisplaytype', 'grades'),
+                                          get_string('configaveragesdisplaytype', 'grades'), false,
+                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
+
+$settings->add(new admin_setting_configselect('grade_report_rangesdisplaytype', get_string('rangesdisplaytype', 'grades'),
+                                          get_string('configrangesdisplaytype', 'grades'), false,
+                                          array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL => $strreal,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE => $strpercentage,
+                                                GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER => $strletter)));
 
-$settings->add(new admin_setting_configselect('grade_report_decimalpoints', get_string('decimalpoints', 'grades'),
-                                          get_string('configdecimalpoints', 'grades'), 2,
-                                          array( '0' => '0',
-                                                 '1' => '1',
-                                                 '2' => '2',
-                                                 '3' => '3',
-                                                 '4' => '4',
-                                                 '5' => '5')));
 $settings->add(new admin_setting_configselect('grade_report_averagesdecimalpoints', get_string('averagesdecimalpoints', 'grades'),
                                           get_string('configaveragesdecimalpoints', 'grades'), 2,
                                           array(GRADE_REPORT_PREFERENCE_INHERIT => $strinherit,
index 39f23ce6d2ba8255f69038223e7c4cea16295548..238c0aad8ec81ebfec6e9120b669e54045169e0d 100644 (file)
@@ -44,6 +44,7 @@ $string['categories'] = 'Categories';
 $string['category'] = 'Category';
 $string['categoriesedit'] = 'Edit Categories';
 $string['categoryname'] = 'Category name';
+$string['changesitedefaults'] = 'Change site defaults';
 $string['choosecategory'] = 'Select Category';
 $string['compact'] = 'Compact';
 $string['configaggregationposition'] = 'The position of the aggregation column in the grader report table, in reference to the real grades.';
@@ -56,7 +57,8 @@ $string['configenableajax'] = 'Adds a layer of AJAX functionality to the grader
 $string['configenableoutcomes'] = 'Support for Outcomes (also known as Competencies, Goals, Standards or Criteria) means that we can grade things using one or more scales that are tied to outcome statements. Enabling outcomes makes such special grading possible throughout the site.';
 $string['configgradeboundary'] = 'A percentage boundary over which grades will be assigned a grade letter (if the Letter grade display type is used). ';
 $string['configgradedisplaytype'] = 'Grades can be shown as real grades, as percentages (in reference to the minimum and maximum grades) or as letters (A, B, C etc..)';
-$string['configgradeletter'] = 'A letter or other symbol used to represent a range of grades. Leave this field empty to use the site default (currently $a).';
+$string['configgradeletter'] = 'A letter or other symbol used to represent a range of grades.';
+$string['configgradeletterdefault'] = 'A letter or other symbol used to represent a range of grades. Leave this field empty to use the site default (currently $a).';
 $string['configmeanselection'] = 'Select which types of grades will be included in the column averages. Cells with no grade can be ignored, or counted as 0 (default setting).';
 $string['configquickfeedback'] = 'Quick Feedback adds a text input element in each grade cell on the grader report, allowing you to edit many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
 $string['configquickgrading'] = 'Quick Grading adds a text input element in each grade cell on the grader report, allowing you to edit the feedback for many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
@@ -70,7 +72,8 @@ $string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade
 $string['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
 $string['configshowranges'] = 'Display a row showing the range of possible for each grading item in the grader report.';
 $string['configshowuserimage'] = 'Whether to show the user\'s profile image next to the name in the grader report.';
-$string['configstudentsperpage'] = 'The number of students to display per page in the grader report. Leave this field empty to use the site default (currently $a).';
+$string['configstudentsperpage'] = 'The number of students to display per page in the grader report.';
+$string['configstudentsperpagedefault'] = 'The number of students to display per page in the grader report. Leave this field empty to use the site default (currently $a).';
 $string['contract'] = 'Contract Category';
 $string['createcategory'] = 'Create Category';
 $string['createcategoryerror'] = 'Could not create a new category';