Contains the specific assignment and the activity which the students complete. Assignment text has the same format as pages content.Table also contains both private and public specs. Public spec is shown to the student to display an exercise and private spec specifies how answers should be checked for correctness and is not revealed to the student..
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
assignment | jsonb | ‘[]’::jsonb | false | Exercise assignment (e.g. “In this exercise prove the statement P=NP.”) in an abstract form. Uses exactly the same format as pages.content. | ||
copied_from | uuid | true | public.exercise_tasks | The original exercise_tasks record of a copy. | ||
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. | |||
exercise_slide_id | uuid | false | public.exercise_task_submissions | public.exercise_slides | Slide where this tasks appears in. | |
exercise_type | varchar(255) | false | Identifier for the exercise service type used for this task. The same identifier needs to exist in exercise_services.slug for the exercise task to work. | |||
id | uuid | uuid_generate_v4() | false | public.exercise_task_gradings public.exercise_task_submissions public.exercise_tasks public.user_exercise_task_states | A unique, stable identifier for the record. | |
model_solution_spec | jsonb | true | Defines what are the correct solutions for the exercise | |||
order_number | integer | false | The order in which the exercise task should appear in a slide. | |||
private_spec | jsonb | true | Defines an an exercise task fully: tells how the exercise is structured and how it should be checked for correctness. All other specs can be derived from this one. The system will never share this spec to students because it contains all correctness checking specifications, including the ones that are meant for server-only checks. | |||
public_spec | jsonb | true | Defines how the initial exercise is specified so that a frontend can show an exercise in its initial state. Derived from private_spec. | |||
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. |
Name | Type | Definition |
---|---|---|
exercise_items_assignment_not_null | n | NOT NULL assignment |
exercise_items_created_at_not_null | n | NOT NULL created_at |
exercise_items_exercise_type_not_null | n | NOT NULL exercise_type |
exercise_items_id_not_null | n | NOT NULL id |
exercise_items_pkey | PRIMARY KEY | PRIMARY KEY (id) |
exercise_items_updated_at_not_null | n | NOT NULL updated_at |
exercise_tasks_copied_from_fkey | FOREIGN KEY | FOREIGN KEY (copied_from) REFERENCES exercise_tasks(id) |
exercise_tasks_exercise_slide_id_fkey | FOREIGN KEY | FOREIGN KEY (exercise_slide_id) REFERENCES exercise_slides(id) |
exercise_tasks_exercise_slide_id_not_null | n | NOT NULL exercise_slide_id |
exercise_tasks_order_number_not_null | n | NOT NULL order_number |
exercise_tasks_order_number_uniqueness | UNIQUE | UNIQUE NULLS NOT DISTINCT (exercise_slide_id, order_number, deleted_at) |
Name | Definition |
---|---|
exercise_items_pkey | CREATE UNIQUE INDEX exercise_items_pkey ON public.exercise_tasks USING btree (id) |
exercise_task_and_slide_ids | CREATE UNIQUE INDEX exercise_task_and_slide_ids ON public.exercise_tasks USING btree (id, exercise_slide_id) |
exercise_tasks_exercise_slide_id_idx | CREATE INDEX exercise_tasks_exercise_slide_id_idx ON public.exercise_tasks USING btree (exercise_slide_id) |
exercise_tasks_order_number_uniqueness | CREATE UNIQUE INDEX exercise_tasks_order_number_uniqueness ON public.exercise_tasks USING btree (exercise_slide_id, order_number, deleted_at) NULLS NOT DISTINCT |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.exercise_tasks FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls