Grade Items Table Schema (grade_items)


Description

This table keeps information about gradeable items (ie columns). If an activity (eg an assignment or quiz) has multiple grade_items associated with it (eg several outcomes or numerical grades), then there will be a corresponding multiple number of rows in this table.

grade_items table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
grade_grades.itemid gradgrad_ite2_fk R
grade_grades_history.itemid gradgradhist_ite2_fk R
grade_import_values.itemid gradimpovalu_ite2_fk R
grade_items_history.oldid graditemhist_old2_fk R
courseid BIGINT 19 null
course.id graditem_cou2_fk R

The course this item is part of

categoryid BIGINT 19 null
grade_categories.id graditem_cat2_fk R

(optional) the category group this item belongs to

itemname VARCHAR 255 null

The name of this item (pushed in by the module)

itemtype VARCHAR 30

'mod', 'blocks', 'import', 'calculated' etc

itemmodule VARCHAR 30 null

'forum', 'quiz', 'csv', etc

iteminstance BIGINT 19 null

id of the item module

itemnumber BIGINT 19 null

Can be used to distinguish multiple grades for an activity

iteminfo LONGTEXT 2147483647 null

Info and notes about this item XXX

idnumber VARCHAR 255 null

Arbitrary idnumber provided by the module responsible

calculation LONGTEXT 2147483647 null

Formula describing how to derive this grade from other items, referring to them using giXXX where XXX is grade item id ... eg something like: =sin(square(#gi20#)) + #gi30#

gradetype SMALLINT 5 1

0 = none, 1 = value, 2 = scale, 3 = text

grademax DECIMAL 10,5 100.00000

What is the maximum allowable grade?

grademin DECIMAL 10,5 0.00000

What is the minimum allowable grade?

scaleid BIGINT 19 null
scale.id graditem_sca2_fk R

If this grade is based on a scale, which one is it?

outcomeid BIGINT 19 null
grade_outcomes.id graditem_out2_fk R

If this grade is related to an outcome, which one is it?

gradepass DECIMAL 10,5 0.00000

What grade is needed to pass? grademin < gradepass <= grademax

multfactor DECIMAL 10,5 1.00000

Multiply all grades by this

plusfactor DECIMAL 10,5 0.00000

Add this to all grades

aggregationcoef DECIMAL 10,5 0.00000

Aggregation coefficient used for category weights or other aggregation types

aggregationcoef2 DECIMAL 10,5 0.00000

Aggregation coefficient used for weights in aggregation types with both extra credit and weight

sortorder BIGINT 19 0

Sorting order of the columns

display BIGINT 19 0

Display as real grades, percentages (in reference to the minimum and maximum grades) or letters (A, B, C etc..), or course default (0)

decimals BIT 1 null

Also known as precision, the number of digits after the decimal point symbol.

hidden BIGINT 19 0

1 is hidden, > 1 is a date to hide until (prevents viewing)

locked BIGINT 19 0

1 is locked, > 1 is a date to lock until (prevents update)

locktime BIGINT 19 0

lock all final grades after this date

needsupdate BIGINT 19 0

If this flag is set, then the whole column will be recalculated

weightoverride BIT 1 0
timecreated BIGINT 19 null

The first time this grade_item was created

timemodified BIGINT 19 null

The last time this grade_item was modified

Table contained -1 rows

grade_items table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
graditem_cat_ix Performance Asc categoryid
graditem_cou_ix Performance Asc courseid
graditem_gra_ix Performance Asc gradetype
graditem_idncou_ix Performance Asc/Asc idnumber + courseid
graditem_itenee_ix Performance Asc/Asc itemtype + needsupdate
graditem_locloc_ix Performance Asc/Asc locked + locktime
graditem_out_ix Performance Asc outcomeid
graditem_sca_ix Performance Asc scaleid

grade_items table relationships