Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
92c24978
Commit
92c24978
authored
Mar 13, 2020
by
Robert Czechowski
Browse files
Fix: Make contests without duration start immediately again
parent
895e1a10
Changes
3
Show whitespace changes
Inline
Side-by-side
src/core.rs
View file @
92c24978
...
...
@@ -307,7 +307,7 @@ pub fn show_contest<T: MedalConnection>(conn: &T, contest_id: i32, session_token
let
left_sec
=
left_secs
%
60
;
let
time_left
=
format!
(
"{}:{:02}"
,
left_min
,
left_sec
);
data
.insert
(
"started"
.to_string
(),
to_json
(
&
true
));
data
.insert
(
"
is_
started"
.to_string
(),
to_json
(
&
true
));
data
.insert
(
"participation_start_date"
.to_string
(),
to_json
(
&
passed_secs
));
data
.insert
(
"total_points"
.to_string
(),
to_json
(
&
totalgrade
));
data
.insert
(
"max_total_points"
.to_string
(),
to_json
(
&
max_totalgrade
));
...
...
templates/default/contest.hbs
View file @
92c24978
...
...
@@ -8,7 +8,7 @@
<p>
Dauer:
{{
contest
.
duration
}}
Minuten
</p>
{{#if
participation
_start
_dat
e
}}
{{#if
is
_starte
d
}}
<p>
Gestartet vor
{{
participation_start_date
}}
Sekunden.
</p>
...
...
templates/jwinf/contest.hbs
View file @
92c24978
...
...
@@ -107,7 +107,7 @@
<!-- <h3 class="title is-4">
{{#if
has_duration
}}
Wettbewerb:
{{else}}
Trainingsaufgaben:
{{/if}}
{{
contest
.
name
}}
</h3>
{{#if
contest
.
duration
}}
<h4 class="subtitle is-5">Dauer:
{{
contest
.
duration
}}
Minuten</h4>
{{/if}}
-->
{{#if
participation
_start
_dat
e
}}
{{#if
is
_starte
d
}}
<p>
{{#if
has_duration
}}
{{#if
time_left
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment