moodle/lib/grade/constants.php
skodak e072450699 MDL-11578 , MDL-11578 , MDL-11573 :
* renamed Preferences to "My report preferences"
* renamed Site defaults to "Report defaults"
* rename Change site defaults to "Change report defaults"
* reintroduced Inherit option to Grader preferences - Nicolas was right, it is not possible to implement preference overrides without it with our current get_pref inplementation
* new separate option in plugin selector "Course settings"
* moved displaytype, decimals and aggregation position to "Course settings"
* created new table grade_settings + related functions grade_get/set_preference()
* user report now uses grade_seq class instead of grade_item::fetch_all(); added preloading of grade items into grade_grade instances
* other minor bugfixing/cleanup/improvements

Please note that the Grader report preferences and its defaults must be resaved again - sorry.
2007-10-08 23:09:10 +00:00

81 lines
3.3 KiB
PHP

<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.org //
// //
// 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 //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/**
* Definitions of constants for gradebook
*
* @author Moodle HQ developers
* @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @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);
// Display style constants
define('GRADE_DISPLAY_TYPE_DEFAULT', 0);
define('GRADE_DISPLAY_TYPE_REAL', 1);
define('GRADE_DISPLAY_TYPE_PERCENTAGE', 2);
define('GRADE_DISPLAY_TYPE_LETTER', 3);
define('GRADE_REPORT_AGGREGATION_POSITION_FIRST', 0);
define('GRADE_REPORT_AGGREGATION_POSITION_LAST', 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_PREFERENCE_DEFAULT', 'default'); // means use setting from site preferences
define('GRADE_REPORT_PREFERENCE_INHERIT', 'inherit'); // means inherit from parent
define('GRADE_REPORT_PREFERENCE_UNUSED', -1);
define('GRADE_REPORT_MEAN_ALL', 0);
define('GRADE_REPORT_MEAN_GRADED', 1);
?>