Index

public.course_model_solution_settings

Description

When a course shows its exercises’ model solutions to students who have neither solved the exercise nor used up its tries. A course without a row reveals them only to those students.

Columns

Name Type Default Nullable Children Parents Comment
course_id uuid false public.courses The course the settings are for.
created_at timestamp with time zone now() false Timestamp when the record was created.
reveal_after_deadline boolean false false Whether an exercise’s model solution is shown to every student once the exercise’s deadline (its own, else its chapter’s) has passed.
reveal_at timestamp with time zone true From when every exercise’s model solution is shown to every student. NULL for never.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
course_model_solution_settings_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
course_model_solution_settings_course_id_not_null n NOT NULL course_id
course_model_solution_settings_created_at_not_null n NOT NULL created_at
course_model_solution_settings_pkey PRIMARY KEY PRIMARY KEY (course_id)
course_model_solution_settings_reveal_after_deadline_not_null n NOT NULL reveal_after_deadline
course_model_solution_settings_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
course_model_solution_settings_pkey CREATE UNIQUE INDEX course_model_solution_settings_pkey ON public.course_model_solution_settings USING btree (course_id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.course_model_solution_settings FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls