Commit 895e1a10 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Allow teachers to start contest regardless of contest grade range

parent 21eab7ab
......@@ -237,8 +237,8 @@ pub fn show_contest<T: MedalConnection>(conn: &T, contest_id: i32, session_token
let contest_not_yet =|start| now < start).unwrap_or(false);
let contest_no_more =|end| now > end).unwrap_or(false);
let grade_too_low =|min_grade| student_grade < min_grade).unwrap_or(false);
let grade_too_high =|max_grade| student_grade > max_grade).unwrap_or(false);
let grade_too_low =|min_grade| student_grade < min_grade && !session.is_teacher).unwrap_or(false);
let grade_too_high =|max_grade| student_grade > max_grade && !session.is_teacher).unwrap_or(false);
let contest_running = !contest_not_yet && !contest_no_more;
let matching_grade = !grade_too_low && !grade_too_high;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment