Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / lib / grade / grade_grade_text.php
blob0db4c2ed96d683e72f4db04d0d7ff33551e6790f
1 <?php // $Id$
3 ///////////////////////////////////////////////////////////////////////////
4 // //
5 // NOTICE OF COPYRIGHT //
6 // //
7 // Moodle - Modular Object-Oriented Dynamic Learning Environment //
8 // http://moodle.com //
9 // //
10 // Copyright (C) 2001-2003 Martin Dougiamas http://dougiamas.com //
11 // //
12 // This program is free software; you can redistribute it and/or modify //
13 // it under the terms of the GNU General Public License as published by //
14 // the Free Software Foundation; either version 2 of the License, or //
15 // (at your option) any later version. //
16 // //
17 // This program is distributed in the hope that it will be useful, //
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20 // GNU General Public License for more details: //
21 // //
22 // http://www.gnu.org/copyleft/gpl.html //
23 // //
24 ///////////////////////////////////////////////////////////////////////////
26 require_once('grade_object.php');
28 /**
29 * A text string used to compute the value displayed by a grade_item.
30 * There can be only one grade_text per grade_item (one-to-one).
32 class grade_grade_text extends grade_object {
33 /**
34 * DB Table (used by grade_object).
35 * @var string $table
37 var $table = 'grade_grades_text';
39 /**
40 * Array of class variables that are not part of the DB table fields
41 * @var array $nonfields
43 var $nonfields = array('table', 'required_fields', 'nonfields');
45 /**
46 * The grade_grade.id this text refers to.
47 * @var int $itemid
49 var $gradeid;
51 /**
52 * Further information like forum rating distribution 4/5/7/0/1
53 * @var string $information
55 var $information;
57 /**
58 * Text format for information (FORMAT_PLAIN, FORMAT_HTML etc...).
59 * @var int $informationformat
61 var $informationformat = FORMAT_MOODLE;
63 /**
64 * Manual feedback from the teacher. This could be a code like 'mi'.
65 * @var string $feedback
67 var $feedback;
69 /**
70 * Text format for feedback (FORMAT_PLAIN, FORMAT_HTML etc...).
71 * @var int $feedbackformat
73 var $feedbackformat = FORMAT_MOODLE;
75 /**
76 * The userid of the person who last modified this text.
77 * @var int $usermodified
79 var $usermodified;
81 /**
82 * Finds and returns a grade_grade_text instance based on params.
83 * @static
85 * @param array $params associative arrays varname=>value
86 * @return object grade_grade_text instance or false if none found.
88 function fetch($params) {
89 return grade_object::fetch_helper('grade_grades_text', 'grade_grade_text', $params);
92 /**
93 * Finds and returns all grade_grade_text instances based on params.
94 * @static
96 * @param array $params associative arrays varname=>value
97 * @return array array of grade_grade_text insatnces or false if none found.
99 function fetch_all($params) {
100 return grade_object::fetch_all_helper('grade_grades_text', 'grade_grade_text', $params);