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 backcour_cou2_fk R
badge.courseid badg_cou2_fk R
block_recent_activity.courseid Implied Constraint R
block_recentlyaccesseditems.courseid blocrece_cou2_fk 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 courcompaggrmeth_cou2_fk R
course_completion_crit_compl.course courcompcritcomp_cou2_fk R
course_completion_criteria.course courcompcrit_cou2_fk R
course_completion_criteria.courseinstance courcompcrit_cou3_fk R
course_completion_defaults.course courcompdefa_cou2_fk R
course_completions.course courcomp_cou2_fk R
course_format_options.courseid courformopti_cou2_fk R
course_modules.course courmodu_cou2_fk R
course_published.courseid Implied Constraint R
course_sections.course coursect_cou_fk R
enrol.courseid enro_cou2_fk R
enrol_flatfile.courseid enroflat_cou2_fk R
enrol_paypal.courseid enropayp_cou2_fk 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
h5pactivity.course h5pa_cou2_fk R
local_activityvisibility.courseid Implied Constraint R
local_activityvisibility.coursemoduleid Implied Constraint R
local_activityvisibility_que.courseid Implied Constraint 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
questionnaire.course ques_cou2_fk R
questionnaire_survey.courseid quessurv_cou2_fk 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 cour_cat2_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
relativedatesmode BIT 1 0

Whether to let this course display course- or activity-related dates relative to the user's enrolment date in this course.

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 1 1
visibleold BIT 1 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 1 0
enablecompletion BIT 1 0

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

completionnotify BIT 1 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