From: nicolasconnault Date: Mon, 30 Jul 2007 09:46:01 +0000 (+0000) Subject: MDL-10210 Updated the admin settings page for the grader report. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=56cef27dab79134f6d7bf524ee0ea215ab947655;p=moodle.git MDL-10210 Updated the admin settings page for the grader report. --- diff --git a/grade/report/grader/preferences.php b/grade/report/grader/preferences.php index 38bdd67b1e..611eade4c4 100644 --- a/grade/report/grader/preferences.php +++ b/grade/report/grader/preferences.php @@ -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 '\n"; +} + // Add tabs $currenttab = 'preferences'; include('tabs.php'); diff --git a/grade/report/grader/preferences_form.php b/grade/report/grader/preferences_form.php index f51148f794..3f449ee631 100644 --- a/grade/report/grader/preferences_form.php +++ b/grade/report/grader/preferences_form.php @@ -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; diff --git a/grade/report/grader/settings.php b/grade/report/grader/settings.php index 2876dab6a8..118199ef28 100644 --- a/grade/report/grader/settings.php +++ b/grade/report/grader/settings.php @@ -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, diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 39f23ce6d2..238c0aad8e 100644 --- a/lang/en_utf8/grades.php +++ b/lang/en_utf8/grades.php @@ -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';