Grade Grades Table Schema (grade_grades)


grade_grades This table keeps individual grades for each user and each item, exactly as imported or submitted by modules. The rawgrademax/min and rawscaleid are stored here to record the values at the time the grade was stored, because teachers might change this for an activity! All the results are normalised/resampled for the final grade value.

grade_grades table columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigint 10 null
grade_grades_history.oldid gradgradhist_old2_fk R
itemid bigint 10 null gradgrad_ite2_fk R

The item this grade belongs to

userid bigint 10 null gradgrad_use3_fk R

The user who this grade is for

rawgrade decimal 10 null

If the grade is a float value (or has been converted to one)

rawgrademax decimal 10 100.00000

The maximum allowable grade when this was created

rawgrademin decimal 10 0.00000

The minimum allowable grade when this was created

rawscaleid bigint 10 null gradgrad_raw2_fk R

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

usermodified bigint 10 null gradgrad_use4_fk R

the userid of the person who last modified this grade

finalgrade decimal 10 null

The final grade (cached) after all calculations are made

hidden bigint 10 0

show 0, hide 1 or hide until date

locked bigint 10 0

not locked 0, locked from date

locktime bigint 10 0

automatic locking of final grade, 0 means none, date otherwise

exported bigint 10 0

date of last grade export, 0 if none

overridden bigint 10 0

indicates grade overridden from gradebook, 0 means none, date means overridden

excluded bigint 10 0

grade excluded from aggregation functions, date means when excluded

feedback longtext 2147483647 null

grading feedback

feedbackformat bigint 10 0

format of feedback text

information longtext 2147483647 null

optiona information

informationformat bigint 10 0

format of information text

timecreated bigint 10 null

the time this grade was first created

timemodified bigint 10 null

the time this grade was last modified

aggregationstatus varchar 10 unknown

One of several values describing how this grade_grade was used when calculating the aggregation. Possible values are "unknown", "dropped", "novalue", "used"

aggregationweight decimal 10 null

If the aggregationstatus == 'included', then this is the percent this item contributed to the aggregation.

Table contained -1 rows

grade_grades table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
gradgrad_ite_ix Performance Asc itemid
gradgrad_locloc_ix Performance Asc/Asc locked + locktime
gradgrad_raw_ix Performance Asc rawscaleid
gradgrad_use2_ix Performance Asc usermodified
gradgrad_use_ix Performance Asc userid
gradgrad_useite_uix Must be unique Asc/Asc userid + itemid

grade_grades table relationships