// visible elements
$mform->addElement('header', 'general', get_string('outcomes', 'grades'));
- $mform->addElement('text', 'fullname', get_string('fullname'));
+ $mform->addElement('text', 'fullname', get_string('fullname'), 'size="40"');
$mform->addRule('fullname', get_string('required'), 'required');
$mform->setType('fullname', PARAM_TEXT);
- $mform->addElement('text', 'shortname', get_string('shortname'));
+ $mform->addElement('text', 'shortname', get_string('shortname'), 'size="20"');
$mform->addRule('shortname', get_string('required'), 'required');
$mform->setType('shortname', PARAM_NOTAGS);
$mform->addElement('select', 'scaleid', get_string('scale'), $options);
$mform->addRule('scaleid', get_string('required'), 'required');
+ $mform->addElement('htmleditor', 'description', get_string('description'), array('cols'=>80, 'rows'=>20));
+
// hidden params
$mform->addElement('hidden', 'id', 0);
// visible elements
$mform->addElement('header', 'general', get_string('scale'));
- $mform->addElement('text', 'name', get_string('name'));
+ $mform->addElement('text', 'name', get_string('name'), 'size="40"');
$mform->addRule('name', get_string('required'), 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="lib/db" VERSION="20070731" COMMENT="XMLDB file for core Moodle tables"
+<XMLDB PATH="lib/db" VERSION="20070801" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="Mostly these are defined site wide ie NULL" PREVIOUS="id" NEXT="shortname"/>
<FIELD NAME="shortname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="The short name or code for this outcome statement" PREVIOUS="courseid" NEXT="fullname"/>
<FIELD NAME="fullname" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="The full description of the outcome (usually 1 sentence)" PREVIOUS="shortname" NEXT="scaleid"/>
- <FIELD NAME="scaleid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="The recommended scale for this outcome." PREVIOUS="fullname" NEXT="timecreated"/>
- <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time this outcome was first created" PREVIOUS="scaleid" NEXT="timemodified"/>
+ <FIELD NAME="scaleid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="The recommended scale for this outcome." PREVIOUS="fullname" NEXT="description"/>
+ <FIELD NAME="description" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="outcome description" PREVIOUS="scaleid" NEXT="timecreated"/>
+ <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time this outcome was first created" PREVIOUS="description" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time this outcome was last updated" PREVIOUS="timecreated" NEXT="usermodified"/>
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the userid of the person who last modified this outcome" PREVIOUS="timemodified"/>
</FIELDS>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="Mostly these are defined site wide ie NULL" PREVIOUS="loggeduser" NEXT="shortname"/>
<FIELD NAME="shortname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="The short name or code for this outcome statement" PREVIOUS="courseid" NEXT="fullname"/>
<FIELD NAME="fullname" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="The full description of the outcome (usually 1 sentence)" PREVIOUS="shortname" NEXT="scaleid"/>
- <FIELD NAME="scaleid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="The recommended scale for this outcome." PREVIOUS="fullname"/>
+ <FIELD NAME="scaleid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="The recommended scale for this outcome." PREVIOUS="fullname" NEXT="description"/>
+ <FIELD NAME="description" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Outcome description" PREVIOUS="scaleid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me" NEXT="oldid"/>
</SENTENCES>
</STATEMENT>
</STATEMENTS>
-</XMLDB>
+</XMLDB>
\ No newline at end of file
$table->addFieldInfo('shortname', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('fullname', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('scaleid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null);
+ $table->addFieldInfo('description', XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null);
$table->addFieldInfo('timecreated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null);
$table->addFieldInfo('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null);
$table->addFieldInfo('usermodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null);
$table->addFieldInfo('shortname', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('fullname', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('scaleid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null);
+ $table->addFieldInfo('description', XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null);
/// Adding keys to table grade_outcomes_history
$table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
$result = $result && add_field($table, $field);
}
+ if ($result && $oldversion < 2007073105) {
+
+ /// Define field description to be added to grade_outcomes
+ $table = new XMLDBTable('grade_outcomes');
+ $field = new XMLDBField('description');
+ if (!field_exists($table, $field)) {
+ $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'scaleid');
+ /// Launch add field description
+ $result = $result && add_field($table, $field);
+ }
+
+ $table = new XMLDBTable('grade_outcomes_history');
+ $field = new XMLDBField('description');
+ if (!field_exists($table, $field)) {
+ $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'scaleid');
+ /// Launch add field description
+ $result = $result && add_field($table, $field);
+ }
+
+ }
/*
*/
var $scaleid;
+ /**
+ * The description of this outcome - FORMAT_MOODLE.
+ * @var string $description
+ */
+ var $description;
+
/**
* The userid of the person who last modified this outcome.
* @var int $usermodified
}
/**
- * Returns outcome short name.
+ * Returns unique outcome short name.
* @return string name
*/
function get_shortname() {
- return format_string($this->shortname);
+ return $this->shortname;
}
/**
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007073104; // YYYYMMDD = date
+ $version = 2007073105; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 dev'; // Human-friendly version name