-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/TS-80-added-contests-list
- Loading branch information
Showing
9 changed files
with
174 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "contests/contest_wrapper.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %} | ||
{{contest.name}} | ||
{% endblock %} | ||
|
||
{% block contest_content %} | ||
{{contest.name}}</br> | ||
Contest description: ... | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "contests/contest_wrapper.html" %} | ||
{% load i18n %} | ||
|
||
{% block contest_content %} | ||
<div class="container"> | ||
<div class="row"> | ||
{% include task_template %} | ||
</div> | ||
{% include "tasks/theta_solutions.html" %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% extends "wrapper.html" %} | ||
|
||
{% block title %} | ||
{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
{% block contest_content %} | ||
{% endblock contest_content %} | ||
</div> | ||
<div class="col-md-4"> | ||
{% if contest.tasks %} | ||
<ul> | ||
<li> | ||
<a href="{% url 'contest_detail' contest.pk %}">{{ contest.name }}</a> | ||
</li> | ||
{% for order, task in contest.ordered_tasks %} | ||
<li> | ||
<a href="{% url 'contest_detail_task' contest.pk order %}">#{{order}} {{task.name}}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "wrapper.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
{% include task_template %} | ||
</div> | ||
{% include "tasks/theta_solutions.html" %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,27 @@ | ||
{% extends "wrapper.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %} | ||
{{task.name}} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<h3>{% trans "TaskStatement" %}</h3> | ||
<p>{{task.statement}}</p> | ||
<h3>{% trans "TaskInputFormat" %}</h3> | ||
<p>{{task.input}}</p> | ||
<h3>{% trans "TaskOutputFormat" %}</h3> | ||
<p>{{task.output}}</p> | ||
<form method="POST" action="{% url 'theta_code' task.id %}"> | ||
{% csrf_token %} | ||
<div class="mb-3"> | ||
<label for="answer" class="form-label">Code</label> | ||
<textarea class="form-control" id="answer" rows="3" name="answer"></textarea> | ||
</div> | ||
<select name="compiler" id="compiler"> | ||
{% if contest %} | ||
{% for compiler in contest.compilers.all %} | ||
<option value="{{compiler.id}}">{{compiler.name}}</option> | ||
{% endfor %} | ||
{% else %} | ||
{% for compiler in task.default_compilers %} | ||
<option value="{{compiler.id}}">{{compiler.name}}</option> | ||
{% endfor %} | ||
{% endif %} | ||
</select> | ||
<button type="submit">Send answer</button> | ||
</form> | ||
{% include "tasks/theta_solutions.html" %} | ||
<h3>{% trans "TaskStatement" %}</h3> | ||
<p>{{task.statement}}</p> | ||
<h3>{% trans "TaskInputFormat" %}</h3> | ||
<p>{{task.input}}</p> | ||
<h3>{% trans "TaskOutputFormat" %}</h3> | ||
<p>{{task.output}}</p> | ||
<form method="POST" action="{% url 'theta_code' task.id %}"> | ||
{% csrf_token %} | ||
<div class="mb-3"> | ||
<label for="answer" class="form-label">Code</label> | ||
<textarea class="form-control" id="answer" rows="3" name="answer"></textarea> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
<select name="compiler" id="compiler"> | ||
{% if contest %} | ||
{% for compiler in contest.compilers.all %} | ||
<option value="{{compiler.id}}">{{compiler.name}}</option> | ||
{% endfor %} | ||
{% else %} | ||
{% for compiler in task.default_compilers %} | ||
<option value="{{compiler.id}}">{{compiler.name}}</option> | ||
{% endfor %} | ||
{% endif %} | ||
</select> | ||
<button type="submit">Send answer</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,21 @@ | ||
{% extends "wrapper.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %} | ||
{{task.name}} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<h3>{% trans "TaskStatement" %}</h3> | ||
<p>{{task.statement}}</p> | ||
<form method="POST" action="{% url 'theta_quiz' task.id %}"> | ||
{% csrf_token %} | ||
{% for option in task.answer_options.all %} | ||
<input | ||
class="form-check-input" | ||
type="radio" | ||
id="{{option.id}}" | ||
name="answer" | ||
value="{{option.id}}" | ||
/> | ||
<label class="form-check-label" for="{{option.id}}"> | ||
{{option.text}} | ||
</label> | ||
<br> | ||
{% endfor %} | ||
<button type="submit">Send answer</button> | ||
</form> | ||
{% include "tasks/theta_solutions.html" %} | ||
</div> | ||
</div> | ||
{% endblock %} | ||
{% load i18n %} | ||
<h3>{% trans "TaskStatement" %}</h3> | ||
<p>{{task.statement}}</p> | ||
<form method="POST" action="{% url 'theta_quiz' task.id %}"> | ||
{% csrf_token %} | ||
{% for option in task.answer_options.all %} | ||
<input | ||
class="form-check-input" | ||
type="radio" | ||
id="{{option.id}}" | ||
name="answer" | ||
value="{{option.id}}" | ||
/> | ||
<label class="form-check-label" for="{{option.id}}"> | ||
{{option.text}} | ||
</label> | ||
<br> | ||
{% endfor %} | ||
<button type="submit">Send answer</button> | ||
</form> |