Index

public.peer_or_self_review_configs

Description

Collection of settings and peer review questions that users have to answer to evaluate each others’ answers.

Columns

Name Type Default Nullable Children Parents Comment
accepting_threshold real 2.1 false The threshold on the average review received for “passing” a peer reviewed exercise. If points_are_all_or_nothing is true, this threshold tells whether to give full points or zero points. If points_are_all_or_nothing is false and peer_review_processing_strategy is automatically_grade_or_manual_review_by average all averages under this threshold will cause an answer to be sent to manual review. In all other cases, this column will be ignored. Peer review questions are on a scale from 1 to 5.
course_id uuid false public.courses Course that this peer review is a part of.
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_id uuid true public.exercises Exercise that this peer review is for. There can be one peer review per course where this field is null, which then will be used as the default option for all peer reviewed exercises on that course.
id uuid uuid_generate_v4() false public.peer_or_self_review_questions public.peer_or_self_review_submissions A unique, stable identifier for the record.
manual_review_cutoff_in_days integer 21 false Number of days that needs to pass for the exercise submission to move to manual review
peer_reviews_to_give integer 3 false The number of peer reviews that the user must give before completing the exercise. Users must always give more peer reviews than receive, to make sure that there are enough peer reviews for each student.
peer_reviews_to_receive integer 2 false The number of peer reviews that the user must receive before completing the exercise.
points_are_all_or_nothing boolean true false True by default and recommended to keep it that way for most courses. If set to true, the student will always receive either full points or no points from the peer reviewed exercise. If set to false, the points will be weighted according to a weight in each peer review question.
processing_strategy peer_review_processing_strategy ‘automatically_grade_by_average’::peer_review_processing_strategy false Determines how we will treat the answer being peer reviewed once it has received enough reviews. Some variants depend on accepting threshold.
review_instructions jsonb true Content of additional instructions shown when self of peer review starts. The content is in an abstract format, the same as pages.content.
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
courses_have_only_one_default_peer_review UNIQUE UNIQUE NULLS NOT DISTINCT (course_id, exercise_id, deleted_at)
more_given_than_received_peer_reviews CHECK CHECK ((peer_reviews_to_give > peer_reviews_to_receive))
peer_reviews_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
peer_reviews_exercise_id_fkey FOREIGN KEY FOREIGN KEY (exercise_id) REFERENCES exercises(id)
peer_reviews_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
courses_have_only_one_default_peer_review CREATE UNIQUE INDEX courses_have_only_one_default_peer_review ON public.peer_or_self_review_configs USING btree (course_id, exercise_id, deleted_at) NULLS NOT DISTINCT
peer_reviews_pkey CREATE UNIQUE INDEX peer_reviews_pkey ON public.peer_or_self_review_configs USING btree (id)

Triggers

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

Relations

er

Generated by tbls