$outcomes = new admin_externalpage('outcomes', get_string('outcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/index.php', 'moodle/grade:manage');
$ADMIN->add('grades', $outcomes);
+/// Grade category settings
+require_once $CFG->libdir . '/grade/constants.php';
+$temp = new admin_settingpage('gradecategorysettings', get_string('gradecategorysettings', 'grades'));
+$strnoforce = get_string('noforce', 'grades');
+
+ // Aggregation type
+$options = array(-1 => $strnoforce,
+ GRADE_AGGREGATE_MEAN =>get_string('aggregatemean', 'grades'),
+ GRADE_AGGREGATE_MEDIAN =>get_string('aggregatemedian', 'grades'),
+ GRADE_AGGREGATE_MIN =>get_string('aggregatemin', 'grades'),
+ GRADE_AGGREGATE_MAX =>get_string('aggregatemax', 'grades'),
+ GRADE_AGGREGATE_MODE =>get_string('aggregatemode', 'grades'),
+ GRADE_AGGREGATE_WEIGHTED_MEAN =>get_string('aggregateweightedmean', 'grades'),
+ GRADE_AGGREGATE_EXTRACREDIT_MEAN=>get_string('aggregateextracreditmean', 'grades'));
+$temp->add(new admin_setting_configselect('aggregation', get_string('aggregation', 'grades'), get_string('aggregationhelp', 'grades'), -1, $options));
+
+$options = array(-1 => $strnoforce, 0 => get_string('forceoff', 'grades'), 1 => get_string('forceon', 'grades'));
+$temp->add(new admin_setting_configselect('aggregateonlygraded', get_string('aggregateonlygraded', 'grades'),
+ get_string('aggregateonlygradedhelp', 'grades'), -1, $options));
+$temp->add(new admin_setting_configselect('aggregateoutcomes', get_string('aggregateoutcomes', 'grades'),
+ get_string('aggregateoutcomeshelp', 'grades'), -1, $options));
+$temp->add(new admin_setting_configselect('aggregatesubcats', get_string('aggregatesubcats', 'grades'),
+ get_string('aggregatesubcatshelp', 'grades'), -1, $options));
+
+$options = array(-1 => $strnoforce, 0 => get_string('none'));
+for ($i=1; $i<=20; $i++) {
+ $options[$i] = $i;
+}
+
+$temp->add(new admin_setting_configselect('keephigh', get_string('keephigh', 'grades'),
+ get_string('keephighhelp', 'grades'), -1, $options));
+$temp->add(new admin_setting_configselect('droplow', get_string('droplow', 'grades'),
+ get_string('droplowhelp', 'grades'), -1, $options));
+
+$ADMIN->add('grades', $temp);
// The plugins must implement a settings.php file that adds their admin settings to the $settings object
$string['aggregation'] = 'Aggregation';
$string['aggregationcoef'] = 'Aggregation coefficient';
$string['aggregationcoefhelp'] = 'Weight applied to all grades in this grade item during aggregation with other grade items.';
-$string['aggregation'] = 'Aggregation';
+$string['aggregationhelp'] = 'Strategy used to aggregate grades across all students in a course.';
$string['aggregationposition'] = 'Aggregation position';
$string['aggregationview'] = 'Aggregation view';
$string['allgrades'] = 'All grades by category';
$string['feedbacksaved'] = 'Feedback saved';
$string['finalgrade'] = 'Final grade';
$string['finalgradehelp'] = 'The final grade (cached) after all calculations are performed.';
+$string['forceoff'] = 'Force: Off';
+$string['forceon'] = 'Force: On';
$string['forelementtypes'] = ' for the selected $a';
$string['forstudents'] = 'For Students';
$string['full'] = 'Full';
$string['gradeboundary'] = 'Letter grade boundary';
$string['gradecategory'] = 'Grade Category';
$string['gradecategoryhelp'] = 'Grade Category Help';
+$string['gradecategorysettings'] = 'Grade Category Settings';
$string['gradedon'] = 'Graded $a';
$string['gradedisplaytype'] = 'Grade display type';
$string['gradeexceptions'] = 'Grade Exceptions';
$string['nocategories'] = 'Grade categories could not be added or found for this course';
$string['nocategoryname'] = 'No category name was given.';
$string['nocategoryview'] = 'No category to view by';
+$string['noforce'] = 'Do not force';
$string['nogradeletters'] = 'No grade letters set';
$string['nogradesreturned'] = 'No grades returned';
$string['noidnumber'] = 'No id number';
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
-// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
-// http://moodle.com //
+// http://moodle.org //
// //
-// Copyright (C) 2001-2003 Martin Dougiamas http://dougiamas.com //
+// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
* @package moodlecore
*/
-// category aggregation types
-define('GRADE_AGGREGATE_MEAN', 0);
-define('GRADE_AGGREGATE_MEDIAN', 2);
-define('GRADE_AGGREGATE_MIN', 4);
-define('GRADE_AGGREGATE_MAX', 6);
-define('GRADE_AGGREGATE_MODE', 8);
-define('GRADE_AGGREGATE_WEIGHTED_MEAN', 10);
-define('GRADE_AGGREGATE_EXTRACREDIT_MEAN', 12);
-
-// grade types
-define('GRADE_TYPE_NONE', 0);
-define('GRADE_TYPE_VALUE', 1);
-define('GRADE_TYPE_SCALE', 2);
-define('GRADE_TYPE_TEXT', 3);
-
-// grade_update() return status
-define('GRADE_UPDATE_OK', 0);
-define('GRADE_UPDATE_FAILED', 1);
-define('GRADE_UPDATE_MULTIPLE', 2);
-define('GRADE_UPDATE_ITEM_DELETED', 3);
-define('GRADE_UPDATE_ITEM_LOCKED', 4);
-
-// Grate teables history tracking actions
-define('GRADE_HISTORY_INSERT', 1);
-define('GRADE_HISTORY_UPDATE', 2);
-define('GRADE_HISTORY_DELETE', 3);
-
-define('GRADE_REPORT_AGGREGATION_POSITION_LEFT', 0);
-define('GRADE_REPORT_AGGREGATION_POSITION_RIGHT', 1);
-define('GRADE_REPORT_AGGREGATION_VIEW_FULL', 0);
-define('GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY', 1);
-define('GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY', 2);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_REAL', 0);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_PERCENTAGE', 1);
-define('GRADE_REPORT_GRADE_DISPLAY_TYPE_LETTER', 2);
-define('GRADE_REPORT_PREFERENCE_DEFAULT', 'default');
-define('GRADE_REPORT_PREFERENCE_INHERIT', 'inherit');
-define('GRADE_REPORT_PREFERENCE_UNUSED', -1);
-define('GRADE_REPORT_MEAN_ALL', 0);
-define('GRADE_REPORT_MEAN_GRADED', 1);
+require_once($CFG->libdir . '/grade/constants.php');
require_once($CFG->libdir . '/grade/grade_category.php');
require_once($CFG->libdir . '/grade/grade_item.php');