Course Table Schema (course)


Description

Central course table

course table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
backup_courses.courseid Implied Constraint R
badge.courseid badg_cou2_fk R
block_recent_activity.courseid Implied Constraint R
block_zoola_module_name.coursemoduleid Implied Constraint R
block_zoola_reports_schedule.courseid Implied Constraint R
competency_coursecomp.courseid compcour_cou3_fk R
competency_coursecompsetting.courseid Implied Constraint R
competency_usercompcourse.courseid Implied Constraint R
course_completion_aggr_methd.course coursecomplaggrmeth_cou_fk R
course_completion_crit_compl.course courcomplcritcoml_cou_fk R
course_completion_criteria.course courcompcrit_cou_fk R
course_completion_criteria.courseinstance courcompcrit_cin_fk R
course_completion_defaults.course courcompdefa_cou2_fk R
course_completions.course courcompl_cou_fk R
course_format_options.courseid courformopti_cou2_fk R
course_modules.course courmodu_cou_fk R
course_published.courseid Implied Constraint R
enrol.courseid enro_cou2_fk R
enrol_flatfile.courseid enroflat_cou2_fk R
enrol_paypal.courseid Implied Constraint R
event.courseid Implied Constraint R
event_subscriptions.courseid Implied Constraint R
feedback_completed.courseid Implied Constraint R
feedback_completedtmp.courseid Implied Constraint R
feedback_sitecourse_map.courseid Implied Constraint R
grade_categories.courseid gradcate_cou2_fk R
grade_categories_history.courseid gradcatehist_cou2_fk R
grade_items.courseid graditem_cou2_fk R
grade_items_history.courseid graditemhist_cou2_fk R
grade_outcomes.courseid gradoutc_cou2_fk R
grade_outcomes_courses.courseid gradoutccour_cou2_fk R
grade_outcomes_history.courseid gradoutchist_cou2_fk R
grade_settings.courseid gradsett_cou2_fk R
groupings.courseid grou_cou4_fk R
groups.courseid grou_cou3_fk R
local_ld_course.courseid localdcour_cou2_fk R
local_ld_lastactivity.courseid Implied Constraint R
local_ld_lastactivity.coursemoduleid Implied Constraint R
logstore_standard_log.courseid Implied Constraint R
lti_tool_settings.course ltitoolsett_cou3_fk R
ltiservice_gradebookservices.courseid Implied Constraint R
post.courseid Implied Constraint R
post.coursemoduleid Implied Constraint R
scale.courseid Implied Constraint R
scale_history.courseid scalhist_cou2_fk R
search_simpledb_index.courseid Implied Constraint R
stats_daily.courseid Implied Constraint R
stats_monthly.courseid Implied Constraint R
stats_user_daily.courseid Implied Constraint R
stats_user_monthly.courseid Implied Constraint R
stats_user_weekly.courseid Implied Constraint R
stats_weekly.courseid Implied Constraint R
tool_monitor_events.courseid Implied Constraint R
tool_monitor_rules.courseid Implied Constraint R
tool_monitor_subscriptions.courseid Implied Constraint R
tool_recyclebin_course.courseid toolrecycour_cou2_fk R
user_lastaccess.courseid Implied Constraint R
workshop.course work_cou2_fk R
category BIGINT 19 0
course_categories.id courcate_cat_fk R
sortorder BIGINT 19 0
fullname VARCHAR 254
shortname VARCHAR 255
idnumber VARCHAR 100
summary LONGTEXT 2147483647 null
summaryformat TINYINT 3 0
format VARCHAR 21 topics
showgrades TINYINT 3 1
newsitems MEDIUMINT 7 1
startdate BIGINT 19 0
enddate BIGINT 19 0
marker BIGINT 19 0
maxbytes BIGINT 19 0
legacyfiles SMALLINT 5 0

course files are not necessary any more: 0 no legacy files, 1 legacy files disabled, 2 legacy files enabled

showreports SMALLINT 5 0
visible BIT 0 1
visibleold BIT 0 1

the state of visible field when hiding parent category, this helps us to recover hidden states when unhiding the parent category later

groupmode SMALLINT 5 0
groupmodeforce SMALLINT 5 0
defaultgroupingid BIGINT 19 0

default grouping used in course modules, does not have key intentionally

lang VARCHAR 30
calendartype VARCHAR 30
theme VARCHAR 50
timecreated BIGINT 19 0
timemodified BIGINT 19 0
requested BIT 0 0
enablecompletion BIT 0 0

1 = allow use of 'completion' progress-tracking on this course. 0 = disable completion tracking on this course.

completionnotify BIT 0 0

Notify users when they complete this course

cacherev BIGINT 19 0

Incrementing revision for validating the course content cache

Table contained -1 rows

course table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
cour_cat_ix Performance Asc category
cour_idn_ix Performance Asc idnumber
cour_sho_ix Performance Asc shortname
cour_sor_ix Performance Asc sortorder

course table relationships