Index

public.exams

Description

An exam is a special set of exercises with a common deadline.

Columns

Name Type Default Nullable Children Parents Comment
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
ends_at timestamp with time zone true The timestamp after which students can no longer work on the exam.
id uuid uuid_generate_v4() false public.course_exams public.ended_processed_exams public.exam_enrollments public.exercise_repositories public.exercise_slide_submissions public.exercise_task_gradings public.exercises public.feedback public.page_visit_datum public.page_visit_datum_summary_by_courses public.page_visit_datum_summary_by_courses_countries public.page_visit_datum_summary_by_courses_device_types public.page_visit_datum_summary_by_pages public.pages public.roles public.user_course_instance_exercise_service_variables public.user_exercise_states A unique, stable identifier for the record.
instructions jsonb ‘[]’::jsonb false Instructions written in the Gutenberg Editor
language varchar(15) true
minimum_points_treshold integer false The minimum amount of points from the exam for student to pass it.
name varchar(255) false A name for the exam to differentiate it from other exams.
organization_id uuid false public.organizations
starts_at timestamp with time zone true The timestamp after which the exam can be started.
time_minutes integer false The duration the exam stays open for the student after they have started it. If the exam ends before the timer runs out (by ends_at), the student’s time is cut short.
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
exams_language_check CHECK CHECK (((language)::text ~ ‘1{2,3}(-[A-Z][a-z]{3})?-[A-Z]{2}$’::text))
exams_name_check CHECK CHECK ((TRIM(BOTH FROM name) <> ’’::text))
exams_organization_id_fkey FOREIGN KEY FOREIGN KEY (organization_id) REFERENCES organizations(id)
exams_pkey PRIMARY KEY PRIMARY KEY (id)
exams_time_minutes_check CHECK CHECK ((time_minutes > 0))

Indexes

Name Definition
exams_pkey CREATE UNIQUE INDEX exams_pkey ON public.exams USING btree (id)

Triggers

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

Relations

er

Generated by tbls


  1. a-z↩︎