struct ContestYaml {Show 21 fields
name: Option<String>,
duration_minutes: Option<i32>,
public_listing: Option<bool>,
protected: Option<bool>,
requires_login: Option<bool>,
requires_contest: Option<Vec<String>>,
participation_start: Option<String>,
participation_end: Option<String>,
review_start: Option<String>,
review_end: Option<String>,
min_grade: Option<i32>,
max_grade: Option<i32>,
team_participation: Option<bool>,
category: Option<String>,
image: Option<String>,
language: Option<String>,
tags: Option<Vec<String>>,
message: Option<String>,
position: Option<i32>,
secret: Option<String>,
tasks: Option<Mapping>,
}
Expand description
ContestYaml
defines the content of a YAML file describing a contest.
Example:
name: "Funny contest"
duration_minutes: 0
public_listing: true
protected: false
requires_login: true
requires_contest:
- "Another contest"
- "Yet another contest"
participation_start: "2019-03-28T00:00:01+01:00",
participation_end: "2019-04-05T23:59:59+01:00",
review_start: "2019-03-28T00:00:01+01:00",
review_end: "2019-04-05T23:59:59+01:00",
min_grade: 1,
max_grade: 8,
team_participation: true,
category: "contests",
image: "funny.png",
language: blockly,
tags:
- funny
- contest
- blockly
message: "This is a <em>really</em> funny contest!"
position: 1,
secret: "telefonbuch",
tasks:
"Task 1": "task/for/three/stars"
"Task 2":
- "subtask/for/two/stars"
- "subtask/for/three/stars"
"Task 3":
"task/for/four/stars": {stars: 4}
"Task 4":
"subtask/for/four/stars": {stars: 4}
"subtask/for/five/stars": {}
Fields§
§name: Option<String>
The name of the contest.
This value must be set!
duration_minutes: Option<i32>
The duration of the contest, in minutes. If set to 0, the contest can be accessed indefinitely. If set to something else, the contest will require a login to participate in order to enforce the time limit.
This value must be set!
public_listing: Option<bool>
Set to true
to show the contest in the list of contest. Note that contests
might still be hidden immediately or later after participation_end
has
passed.
protected: Option<bool>
Set to true
to protect contest participations. Protected contest
participations can not be deleted by teachers – only by admins.
requires_login: Option<bool>
Set to true
to require a login for participations. Useful for contests
with duration_minutes
set to 0
.
requires_contest: Option<Vec<String>>
List of contests, of which one the users is required to have a participation in, in order to participate in the contest defined by this very config.
participation_start: Option<String>
Date and time of the start of the contest. If not set, the contest can be
started at any time before participation_end
.
participation_end: Option<String>
Date and time of the end of the contest. If not set, the contest can be
started at any time after participation_start
. Started contests can stil
accessed during their duration even if participation_end
is in the past.
review_start: Option<String>
Start of the review mode. Sensible values are the same value as
participation_start
to allow users to review their submissions right
after participating, or the same value as participation_end
to allow users
to review their submissions after the contest has ended. One of
review_start
and review_end
must be set to enable the review mode!
review_end: Option<String>
End of the review mode. One of review_start
and review_end
must be set
to enable the review mode!
min_grade: Option<i32>
The minimum grade of the user for this contest to participate in.
max_grade: Option<i32>
The maximum grade of the user for this contest to participate in.
team_participation: Option<bool>
Set to true
to allow for team participations.
category: Option<String>
The category for this contest to be shown in.
image: Option<String>
An image to be shown for this contest in the list of contests.
language: Option<String>
The language of the contest. Can be set to blockly
or python
.
A list of tags to annotate the contest with. Contests can be filtered by tag on the contest list pages.
message: Option<String>
A message to be displayed at the contest (in a box or similar). Might contain HTML, which will not be escaped by the platform.
position: Option<i32>
A number to order the contests by in the contest list. Contest will be ordered by DESCENDING position number.
secret: Option<String>
A password required to start a participation in this contest. Also allows
contests to be searched by this value, so this secret
should be reused
between contests ONLY if the intended audience is exactly the same.
tasks: Option<Mapping>
The mapping of task names to task information.
A task information can be either:
- A path of a task. The task will be worth 3 stars.
- A list of paths to subtasks. The first subtask will be worth 2 stars, each additional subtask will be worth one additional star.
- A mapping of paths to additional information. The additional
information is a mapping that currently only has one pemitted key,
stars
with the value being the number of stars for this task/subtask.
If language
is not set, each path for an algorea-style task has to be
prefixed with either B
or P
in order to enable the algorea task wrapper
for Blockly or Python, respectively.
Trait Implementations§
Source§impl Debug for ContestYaml
impl Debug for ContestYaml
Source§impl<'de> Deserialize<'de> for ContestYaml
impl<'de> Deserialize<'de> for ContestYaml
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ContestYaml
impl RefUnwindSafe for ContestYaml
impl Send for ContestYaml
impl Sync for ContestYaml
impl Unpin for ContestYaml
impl UnwindSafe for ContestYaml
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PersistentInto<Arc<Mutex<T>>> for T
impl<T> PersistentInto<Arc<Mutex<T>>> for T
§fn persistent_into(self) -> Arc<Mutex<T>>
fn persistent_into(self) -> Arc<Mutex<T>>
self
into a value of type T
.§impl<T> PersistentInto<Arc<RwLock<T>>> for T
impl<T> PersistentInto<Arc<RwLock<T>>> for T
§fn persistent_into(self) -> Arc<RwLock<T>>
fn persistent_into(self) -> Arc<RwLock<T>>
self
into a value of type T
.§impl<T> PersistentInto<Arc<T>> for T
impl<T> PersistentInto<Arc<T>> for T
§fn persistent_into(self) -> Arc<T>
fn persistent_into(self) -> Arc<T>
self
into a value of type T
.§impl<T> PersistentInto<T> for T
impl<T> PersistentInto<T> for T
§fn persistent_into(self) -> T
fn persistent_into(self) -> T
self
into a value of type T
.