Course Table Schema (course)


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_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_completion_history.courseid courcomphist_cou2_fk R
course_completion_log.courseid courcomplog_cou2_fk R
course_completions.course courcomp_cou2_fk R
course_format_options.courseid courformopti_cou2_fk R
course_info_data.courseid courinfodata_cou2_fk R
course_modules.course courmodu_cou2_fk R
course_published.courseid Implied Constraint R
course_sections.course coursect_cou_fk R
dp_plan_course_assign.courseid dpplancourassi_cou2_fk 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
facetoface.course face_cou2_fk R
facetoface_notification.courseid facenoti_cou2_fk 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_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
post.courseid Implied Constraint R
post.coursemoduleid Implied Constraint R
prog_completion_history.recurringcourseid progcomphist_rec3_fk R
prog_courseset_course.courseid progcourcour_cou6_fk R
prog_recurrence.currentcourseid progrecu_cur3_fk R
prog_recurrence.nextcourseid progrecu_nex3_fk R
questionnaire_survey.courseid Implied Constraint R
reminder.courseid Implied Constraint R
scale.courseid Implied Constraint R
scale_history.courseid scalhist_cou2_fk 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
totara_compl_import_course.courseid Implied Constraint R
totara_connect_client_courses.courseid totaconncliecour_cou2_fk R
totara_core_course_vis_map.courseid totacorecourvismap_cou2_fk R
user_lastaccess.courseid Implied Constraint R
workshop.course work_cou2_fk R
category BIGINT 19 0 cour_cat_fk R
sortorder BIGINT 19 0
fullname VARCHAR 1333
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 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.

completionstartonenrol BIT 1 0

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

completionprogressonview BIT 1 0
completionnotify BIT 1 0

Notify users when they complete this course

audiencevisible SMALLINT 5 2

Audience visibility setting

cacherev BIGINT 19 0

Incrementing revision for validating the course content cache

coursetype SMALLINT 5 0

Totara course type from totara_core

icon VARCHAR 255 null

Totara course icon from totara_core

Table contained -1 rows

course table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
cour_aud_ix Performance Asc audiencevisible
cour_catsor_ix Performance Asc/Asc category + sortorder
cour_idn_ix Performance Asc idnumber
cour_sho_ix Performance Asc shortname
cour_sor_ix Performance Asc sortorder

course table relationships