scaleid. * @var object $scale */ var $scale; /** * The id of the scale referenced by this outcome. * @var int $scaleid */ var $scaleid; /** * The userid of the person who last modified this outcome. * @var int $usermodified */ var $usermodified; /** * Constructor. Extends the basic functionality defined in grade_object. * @param array $params Can also be a standard object. * @param boolean $fetch Wether or not to fetch the corresponding row from the DB. */ function grade_outcome($params=NULL, $fetch=true) { $this->grade_object($params, $fetch); if (!empty($this->scaleid)) { $this->scale = new grade_scale(array('id' => $this->scaleid)); $this->scale->load_items(); } } /** * Finds and returns a grade_outcome object based on 1-3 field values. * @static * * @param boolean $static Unless set to true, this method will also set $this object with the returned values. * @param string $field1 * @param string $value1 * @param string $field2 * @param string $value2 * @param string $field3 * @param string $value3 * @param string $fields * @return object grade_outcome object or false if none found. */ function fetch($field1, $value1, $field2='', $value2='', $field3='', $value3='', $fields="*") { if ($grade_outcome = get_record('grade_outcomes', $field1, $value1, $field2, $value2, $field3, $value3, $fields)) { $grade_outcome = new grade_outcome($grade_outcome); return $grade_outcome; } else { return false; } } /** * Returns the most descriptive field for this object. This is a standard method used * when we do not know the exact type of an object. * @return string name */ function get_name() { return $this->shortname; } } ?>