Skip to content
{% extends "course/course-base.html" %}
{% extends "course/course-datatables.html" %}
{% load i18n %}
{% load static %}
{% block title %}
{% trans "List of Participants" %} - {% trans "RELATE" %}
{% endblock %}
{% block header_extra %}
{% include "datatables-header.html" %}
{% trans "List of Participants" %} - {{ relate_site_name }}
{% endblock %}
{% block content %}
<h1>{% trans "List of Participants" %}</h1>
<a href="{% url "relate-edit_participation" course.identifier -1 %}" class="btn btn-default">{% trans "Add participant" %}</a>
<a href="{% url "relate-edit_participation" course.identifier -1 %}" class="btn btn-outline-secondary">{% trans "Add participant" %}</a>
{% include "course/participation-table.html" with participations=participations %}
......
{% extends "course/course-base.html" %}
{% extends "course/course-datatables.html" %}
{% load i18n %}
{% load static %}
{% block title %}
{% trans "My Grades" %} - {% trans "RELATE" %}
{% endblock %}
{% block header_extra %}
{% include "datatables-header.html" %}
{% trans "My Grades" %} - {{ relate_site_name }}
{% endblock %}
{% block content %}
......@@ -22,24 +18,31 @@
<th>{% trans "Property" %}</th><th>{% trans "Value" %}</th>
</thead>
<tbody>
<tr>
<td>{% trans "User ID" %}</td>
<td><span class="sensitive">{{ grade_participation.user.username }}</span></td>
</tr>
<tr>
<td>{% trans "Name" context "real name of a user" %}</td>
<td>
<span class="sensitive">
{{ grade_participation.user.get_full_name }}
</span>
</td>
</tr>
{% if not pperm.view_participant_masked_profile %}
<tr>
<td>{% trans "User ID" %}</td>
<td><span class="sensitive">{{ grade_participation.user.username }}</span></td>
</tr>
<tr>
<td>{% trans "Name" context "real name of a user" %}</td>
<td>
<span class="sensitive">
{{ grade_participation.user.get_full_name }}
</span>
</td>
</tr>
{% else %}
<tr>
<td>{% trans "User" %}</td>
<td><span class="sensitive">{{ grade_participation.user.get_masked_profile }}{% if grade_participation.user == request.user %}(<strong>{% trans "ME" %})</strong>{% endif %}</span></td>
</tr>
{% endif %}
<tr>
<td>{% trans "Tags" %}</td>
<td>
{% for ptag in grade_participation.tags.all %}
{% if is_privileged_view or ptag.shown_to_participant %}
<span class="label label-default">{{ ptag.name }}</span>
<span class="badge rounded-pill text-bg-primary">{{ ptag.name }}</span>
{% endif %}
{% endfor %}
</td>
......@@ -81,18 +84,19 @@
{% endfor %}
</tbody>
</table>
{% endblock %}
{% load coursetags %}
{% block page_bottom_javascript_extra %}
{% get_current_js_lang_name as LANG %}
<script type="text/javascript">
var tbl = $("table.gradebook-single").dataTable({
"scrollCollapse": true,
"paging": false,
"columnDefs": [{ type: 'name', targets: 1 }],
"language": {url: '{% static "datatables-i18n/i18n/" %}{{LANG}}.json'},
"language": rlDataTables.getI18nTable('{{ LANG}}'),
} );
</script>
{{ block.super }}
{% endblock %}
......@@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}
{% trans "Grade book" %}: {{ opportunity.name }} - {% trans "RELATE" %}
{% trans "Grade book" %}: {{ opportunity.name }} - {{ relate_site_name }}
{% endblock %}
{% block content %}
......@@ -17,7 +17,11 @@
<td>{% trans "Participant" %}</td>
<td>
<span class="sensitive">
{{ grade_participation.user.get_full_name }} ({{ grade_participation.user.username }})
{% if not pperm.view_participant_masked_profile %}
{{ grade_participation.user.get_full_name }} ({{ grade_participation.user.username }})
{% else %}
{{ grade_participation.user.get_masked_profile }}{% if grade_participation.user == request.user %}(<strong>{% trans "ME" %}</strong>){% endif %}
{% endif %}
</span>
</td>
</tr>
......@@ -34,7 +38,7 @@
<td>{% trans "Flow" %}</td>
<td>
{% if show_privileged_info %}
<a href="{% url "relate-view_grades_by_opportunity" course.identifier opportunity.id %}"><i class="fa fa-level-up"></i> <tt>{{ opportunity.flow_id }}</tt></a>
<a href="{% url "relate-view_grades_by_opportunity" course.identifier opportunity.id %}"><i class="bi bi-arrow-90deg-up"></i> <tt>{{ opportunity.flow_id }}</tt></a>
&middot;
{% endif %}
<a href="{% url "relate-view_start_flow" course.identifier opportunity.flow_id %}">{% trans "Flow start page" %}</a>
......@@ -47,7 +51,7 @@
<td>
{% if avg_grade_percentage != None %}
{# Translators: average grade of a flow, format "10% (out of 5 grades)" #}
{% blocktrans trimmed with avg_grade_percentage=avg_grade_percentage|floatformat %}
{% blocktrans trimmed with avg_grade_percentage=avg_grade_percentage|floatformat:"-2" %}
{{ avg_grade_percentage }}%
(out of {{ avg_grade_population }} grades)
{% endblocktrans %}
......@@ -85,7 +89,7 @@
{% if gchange.is_superseded %}<s>{% endif %}
<span class="sensitive">
{% if gchange.points != None %}
{% blocktrans trimmed with points=gchange.points|floatformat:1 max_points=gchange.max_points|floatformat:1 percentage=gchange.percentage|floatformat:1 %}
{% blocktrans trimmed with points=gchange.points|floatformat:"-2" max_points=gchange.max_points|floatformat:"-2" percentage=gchange.percentage|floatformat:"-2" %}
{{ points }}/{{ max_points }}
points
({{ percentage }}%)
......@@ -192,13 +196,13 @@
<span class="sensitive">
{% if flow_session.max_points != None %}
{% if flow_session.points != None %}
<b>{{ flow_session.points|floatformat:1 }}</b>
<b>{{ flow_session.points|floatformat:"-2" }}</b>
/
{{ flow_session.max_points|floatformat:1 }}
{{ flow_session.max_points|floatformat:"-2" }}
(<b>{{ flow_session.points_percentage|floatformat }}%</b>)
(<b>{{ flow_session.points_percentage|floatformat:"-2" }}%</b>)
{% else %}
{% blocktrans trimmed with max_points=flow_session.max_points|floatformat:1 %}
{% blocktrans trimmed with max_points=flow_session.max_points|floatformat:"-2" %}
(grade not available)
({{ max_points }} points achievable)
{% endblocktrans %}
......@@ -231,21 +235,24 @@
{% for visit in flow_session.answer_visits %}
{% if visit %}
<tr>
<td>{{ visit.page_data.ordinal }}</td>
<td>{{ visit.page_data.page_ordinal }}</td>
<td>
{% if show_privileged_info %}
<a href="{% url "relate-grade_flow_page" course.identifier flow_session.id visit.page_data.ordinal %}"><tt>{{ visit.page_data.group_id }}/{{ visit.page_data.page_id }}</tt></a>
<a href="{% url "relate-grade_flow_page" course.identifier flow_session.id visit.page_data.page_ordinal %}"><tt>{{ visit.page_data.group_id }}/{{ visit.page_data.page_id }}</tt></a>
{% else %}
{% if visit.page_data.title %}
{{ visit.page_data.title }}
{% if visit.page_data.bookmarked %}
<i class="bi bi-star-filled" aria-hidden="true"></i>
{% endif %}
{{ visit.page_data.title|safe }}
{% else %}
{{ visit.page_data.group_id }}/{{ visit.page_data.page_id }}
{% endif %}
{% endif %}
</td>
{% if visit.get_most_recent_grade != None and visit.get_most_recent_grade.value != None %}
<td><span class="sensitive">{{ visit.get_most_recent_grade.percentage|floatformat:1 }}%</span></td>
<td><span class="sensitive">{{ visit.get_most_recent_grade.value|floatformat:1 }}/{{ visit.get_most_recent_grade.max_points }}</span></td>
<td><span class="sensitive">{{ visit.get_most_recent_grade.percentage|floatformat:"-2" }}%</span></td>
<td><span class="sensitive">{{ visit.get_most_recent_grade.value|floatformat:"-2" }}/{{ visit.get_most_recent_grade.max_points }}</span></td>
{% if show_privileged_info %}
<td>{{ visit.get_most_recent_grade.grader.username }} </td>
{% endif %}
......@@ -265,43 +272,43 @@
{% endif %}
{% if allow_session_actions %}
<td>
<td class="lh-lg">
{% if pperm.regrade_flow_session %}
<button type="submit" name="regrade_{{flow_session.id}}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "Regrade" %}
</button>
{% endif %}
{% if flow_session.in_progress %}
{% if pperm.impose_flow_session_deadline %}
<button type="submit" name="imposedl_{{flow_session.id}}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "Impose deadline" %}
</button>
{% endif %}
{% if pperm.end_flow_session %}
<button type="submit" name="end_{{flow_session.id}}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "End and grade" %}
</button>
{% endif %}
{% else %}
{% if pperm.reopen_flow_session %}
<a href="{% url "relate-view_reopen_session" course.identifier flow_session.id opportunity.id %}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "Reopen" %}
</a>
{% endif %}
{% if pperm.recalculate_flow_session_grade %}
<button type="submit" name="recalculate_{{flow_session.id}}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "Recalculate grade" %}
</button>
{% endif %}
{% endif %}
{% if pperm.grant_exception %}
<a href="{% url "relate-grant_exception_stage_3" course.identifier flow_session.participation.id flow_session.flow_id flow_session.id %}"
class="btn btn-primary btn-xs relate-btn-xs-vert-spaced">
class="btn btn-outline-primary btn-sm relate-btn-xs-vert-spaced">
{% trans "Grant exception" %}
</a>
{% endif %}
......@@ -315,9 +322,9 @@
{% endif %}
{% if show_privileged_info and opportunity.flow_id %}
<div class="well">
<div class="relate-well">
<a href="{% url "relate-grant_exception_stage_2" course.identifier grade_participation.id opportunity.flow_id %}"
class="btn btn-primary btn-default">
class="btn btn-outline-primary">
{% trans "Grant exception" %}
</a>
</div>
......
{% extends "course/course-base.html" %}
{% extends "course/course-datatables.html" %}
{% load i18n %}
{% block title %}
{% trans "Grade book" %} - {% trans "RELATE" %}
{% endblock %}
{% block header_extra %}
{% include "datatables-header.html" %}
{% trans "Grade book" %} - {{ relate_site_name }}
{% endblock %}
{% block content %}
......@@ -14,8 +10,12 @@
<table class="table table-striped gradebook ">
<thead>
<th class="headcol">{% trans "User ID" %}</th>
<th class="datacol">{% trans "Name" context "real name of a user" %}</th>
{% if not pperm.view_participant_masked_profile %}
<th class="datacol">{% trans "User ID" %}</th>
<th class="datacol">{% trans "Name" context "real name of a user" %}</th>
{% else %}
<th class="datacol">{% trans "User" %}</th>
{% endif %}
{% for opp in grading_opportunities reversed %}
<th class="datacol"><a href="{% url "relate-view_grades_by_opportunity" course.identifier opp.pk %}">{{ opp.name }}</a> <tt style="font-size:x-small">({{ opp.identifier }})</tt></th>
{% endfor %}
......@@ -23,13 +23,30 @@
<tbody>
{% for participation, grades in grade_table %}
<tr>
<td class="headcol"><a href="{% url "relate-view_participant_grades" course.identifier participation.id %}"><span class="sensitive">{{ participation.user.username }}</span></a></td>
<td class="headcol"><a href="{% url "relate-view_participant_grades" course.identifier participation.id %}">
<span class="sensitive">
{% if not pperm.view_participant_masked_profile %}
{{ participation.user.username }}
{% else %}
{% if participation.user == user %}{% trans "Me" %}{% else %}{{ participation.user.get_masked_profile }}{% endif %}
{% endif %}
</span></a>
{% if pperm.view_participant_masked_profile %}
{% if participation|has_permission:"view_gradebook" %}
({{ participation.get_role_desc }})
{% endif %}
{% endif %}
</td>
{% if not pperm.view_participant_masked_profile %}
<td class="datacol">
<span class="sensitive">
{{ participation.user.get_full_name }}
</span>
({{ participation.get_role_desc }})
{% if participation|has_permission:"view_gradebook" %}
({{ participation.get_role_desc }})
{% endif %}
</td>
{% endif %}
{% for grade_info in grades reversed %}
<td class="datacol"
{% if grade_info.grade_state_machine.percentage != None %}
......@@ -46,8 +63,10 @@
{% endfor %}
</tbody>
</table>
{% endblock %}
{% load static coursetags %}
{% block page_bottom_javascript_extra %}
{% load static %}
{% get_current_js_lang_name as LANG %}
<script type="text/javascript">
var tbl = $("table.gradebook").dataTable({
......@@ -56,9 +75,9 @@
"paging": true,
"ordering": true,
"columnDefs": [{ type: 'name', targets: 1 }],
"language": {url: '{% static "datatables-i18n/i18n/" %}{{LANG}}.json'},
"language": rlDataTables.getI18nTable('{{ LANG}}'),
} );
new $.fn.dataTable.FixedColumns(tbl);
</script>
{{ block.super }}
{% endblock %}
......@@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}
{% trans "Grader Statistics" %}: {{ flow_id }} - {% trans "RELATE" %}
{% trans "Grader Statistics" %}: {{ flow_id }} - {{ relate_site_name }}
{% endblock %}
{% block content %}
......
......@@ -13,7 +13,7 @@
<td class="histogram-bar-cell">
{% if bin.percentage != None %}
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar"
<div class="progress-bar bg-info" role="progressbar"
aria-valuenow="{{ bin.percentage }}" aria-valuemin="0" aria-valuemax="100"
style="width: {{ bin.percentage|stringformat:".4f" }}%">
<span class="stats-percentage">{{ bin.percentage|floatformat:1 }}%</span>
......
......@@ -13,7 +13,7 @@
</span>
<div class="progress">
{% if bin.percentage != None %}
<div class="progress-bar progress-bar-info" role="progressbar"
<div class="progress-bar bg-info" role="progressbar"
aria-valuenow="{{ bin.percentage }}" aria-valuemin="0" aria-valuemax="100"
style="width: {{ bin.percentage|stringformat:".1f" }}%">
<span class="stats-percentage">{{ bin.percentage|floatformat:1 }}%</span>
......
......@@ -2,62 +2,73 @@
{% load i18n %}
{% block content %}
<div class="jumbotron">
{% trans "RELATE" as RELATE %}
<h1>{% blocktrans %} Welcome to {{ RELATE }} {% endblocktrans %}</h1>
<p>{% trans "RELATE is an Environment for Learning And TEaching" %}</p>
<p>
<a class="btn btn-lg btn-primary" href="https://github.com/inducer/relate" role="button">{% trans "Learn more" %} &raquo;</a>
</p>
</div>
{% block cover %}
{% if current_courses or past_courses %}
{% if current_courses %}
<div class="row">
{% for course in current_courses %}
<div class="col-md-4">
<h3>{{course.number}} {{course.time_period}}</h3>
<p>{{course.name}}</p>
<p><a class="btn btn-default" href="{% url 'relate-course_page' course.identifier %}" role="button">{% trans "View" %} &raquo;</a></p>
</div>
{% endfor %}
<div class="card mb-4">
<div class="card-body">
<h1>{% blocktrans with RELATE=relate_site_name %} Welcome to {{ RELATE }} {% endblocktrans %}</h1>
<p>{% trans "RELATE is an Environment for Learning And TEaching" %}</p>
<p>
<a class="btn btn-lg btn-outline-primary" href="https://github.com/inducer/relate" role="button">{% trans "Learn more" %} &raquo;</a>
</p>
</div>
</div>
<div class="jumbotron">
</div>
{% endblock %}
{% block course_list %}
{% if current_courses or past_courses %}
{% block current_course_list %}
{% if current_courses %}
<div class="d-flex mb-1 flex-wrap">
{% for course in current_courses %}
<div class="card me-3 mb-3" style="width: 18rem;">
<h5 class="card-header">{{course.name}}</h5>
<div class="card-body">
<p class="text-muted card-text">{{course.number}} {{course.time_period}}</p>
<a class="btn btn-primary" href="{% url 'relate-course_page' course.identifier %}" role="button">{% trans "View" %} &raquo;</a>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% if past_courses %}
{% block past_course_list %}
<h3>{% trans "Past Courses" %}</h3>
<table class="table table-condensed">
<tr>
<th>Number</th>
<th></th>
<th>Name</th>
<th>Time</th>
</tr>
{% for course in past_courses %}
<tr
{% if not course.accepts_enrollment or course.hidden %}
class="text-muted"
{% endif %}
>
<td><a class="link-secondary" href="{% url 'relate-course_page' course.identifier %}">{{course.number}}</a></td>
<td><a class="link-secondary" href="{% url 'relate-course_page' course.identifier %}">{{course.time_period}}</a></td>
<td>{{course.name}}</td>
<td>{% if course.start_date %}{{course.start_date}}{% endif %}{% if course.start_date or course.end_date %} - {% endif %}{% if course.end_date %}{{course.end_date}}{% endif %}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% endif %}
{% else %}
{% blocktrans trimmed with RELATE=relate_site_name %} There are no courses hosted on this {{ RELATE }} site. {% endblocktrans %}
{% if not user.is_authenticated %}
{% url "relate-sign_in_by_user_pw" as relate-sign_in_by_user_pw %}
{% blocktrans trimmed %}
<a href="{{ relate-sign_in_by_user_pw }}">Sign in</a> to get started.
{% endblocktrans %}
{% endif %}
{% endif %}
{% if past_courses %}
<h3>{% trans "Past Courses" %}</h3>
<table class="table table-condensed">
<tr>
<th>Number</th>
<th></th>
<th>Name</th>
<th>Time</th>
</tr>
{% for course in past_courses %}
<tr
{% if not course.accepts_enrollment or course.hidden %}
class="text-muted"
{% endif %}
>
<td><a href="{% url 'relate-course_page' course.identifier %}">{{course.number}}</a>
<td><a href="{% url 'relate-course_page' course.identifier %}">{{course.time_period}}</a>
<td>{{course.name}}</td>
<td>{{course.start_date}}{% if course.end_date %} - {{course.end_date}}{% endif %}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% else %}
{% trans "RELATE" as RELATE %}
{% blocktrans trimmed %} There are no courses hosted on this {{ RELATE }} site. {% endblocktrans %}
{% if not user.is_authenticated %}
{% url "relate-sign_in_by_user_pw" as relate-sign_in_by_user_pw %}
{% blocktrans trimmed %}
<a href="{{ relate-sign_in_by_user_pw }}">Sign in</a> to get started.
{% endblocktrans %}
{% if user.is_staff %}
<a class="btn btn-outline-secondary" href="{% url 'relate-set_up_new_course' %}" role="button">{% trans "Set up new course" %} &raquo;</a>
{% endif %}
{% endif %}
{% if user.is_staff %}
<hr>
<a class="btn btn-primary" href="{% url 'relate-set_up_new_course' %}"" role="button">{% trans "Set up new course" %} &raquo;</a></p>
{% endif %}
{% endblock %}
{% endblock %}
{% load crispy_forms_tags %}
{% load i18n %}
<div class="well">
<div class="relate-well">
{% crispy form %}
</div>
<div class="panel panel-default">
<div class="panel-heading">{% trans "Rubric" %}</div>
<div class="panel-body">
<div class="card">
<div class="card-header">{% trans "Rubric" %}</div>
<div class="card-body">
{{ rubric|safe }}
</div>
</div>
......
......@@ -22,7 +22,7 @@
</ul>
<div class="alert alert-warning">
<p>
<i class="fa fa-warning"></i>
<i class="bi bi-exclamation-triangle"></i>
<b>{% trans "Unrecognized events were found." %}</b>
</p>
......@@ -35,7 +35,7 @@
</div>
{% else %}
<div class="alert alert-success">
<i class="fa fa-hand-scissors-o"></i>
<i class="bi bi-check"></i>
{% trans "No unrecognized events were found." %}
</div>
{% endif %}
......
{%- extends 'basic.tpl' -%}
{# This is to prevent code_cell being process by markdown_to_html #}
{% block input %}<pre><relate_ipynb>{{ super() }}</relate_ipynb></pre>
{%- endblock input %}
{# This is to remove the empty cells ahead of markdown_cells #}
{% block empty_in_prompt -%}
{%- endblock empty_in_prompt %}
\ No newline at end of file
......@@ -6,7 +6,7 @@
<p><b>{% trans "Private key:" %}</b></p>
<p>{% blocktrans trimmed %}
Copy and paste this block of text into the 'private key' field in RELATE.
Copy and paste this block of text into the 'private key' field in {{ relate_site_name }}.
{% endblocktrans %}</p>
<pre>{{ public_key }}</pre>
......
......@@ -6,17 +6,19 @@
{% block content %}
<h1>{% trans "Sign in or create account" %}</h1>
{% if relate_sign_in_by_exam_tickets_enabled or relate_sign_in_by_username_enabled %}
<div class="alert alert-info">
<i class="fa fa-chevron-left"></i>
<i class="bi bi-chevron-left"></i>
{% url "relate-sign_in_choice" as relate-sign_in_choice %}
{% blocktrans trimmed %}
If you cannot or would not like to sign in by email,
<a href="{{ relate-sign_in_choice }}">please choose a different method to sign in</a>.
{% endblocktrans %}
</div>
{% endif %}
<div class="alert alert-warning">
<i class="fa fa-warning"></i>
<i class="bi bi-exclamation-triangle"></i>
{% comment %}
Translators: For courses which require specific email suffix for enrollment, translate the following literals
with your customized email suffix.
......@@ -29,7 +31,7 @@
{% endblocktrans %}
</div>
<div class="well">
<div class="relate-well">
{% crispy form %}
</div>
{% endblock %}
......@@ -7,16 +7,16 @@
<h1>{% trans "Sign in" %}</h1>
<div class="alert alert-info">
<i class="fa fa-chevron-left"></i>
<i class="bi bi-chevron-left"></i>
{% url "relate-sign_in_choice" as relate-sign_in_choice %}
{% blocktrans trimmed %}
If you cannot or would not like to sign in using a RELATE-specific
If you cannot or would not like to sign in using a {{ relate_site_name }}-specific
user name or password,
<a href='{{ relate-sign_in_choice }}{{next_uri}}'>please choose a different method to sign in</a>.
{% endblocktrans %}
</div>
<div class="alert alert-warning">
<i class="fa fa-warning"></i>
<i class="bi bi-exclamation-triangle"></i>
{% url "relate-sign_in_choice" as relate-sign_in_choice %}
{% blocktrans trimmed %}
Note that the user name and password needed to use this form
......@@ -26,7 +26,7 @@
</div>
{% if relate_registration_enabled %}
<div class="alert alert-info">
<i class="fa fa-user-plus"></i>
<i class="bi bi-person-plus"></i>
{% url "relate-sign_up" as relate-sign_up %}
{% blocktrans trimmed %}
If you do not have an account,
......@@ -40,7 +40,7 @@
</div>
{% endif %}
<div class="well">
<div class="relate-well">
<form method="post" class="form-horizontal">
{% crispy form %}
<input type="hidden" name="next" value="{{ next }}" />
......
{% extends "course/course-base.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %}
{% trans "Manage Authentication Tokens" %}: - {{ relate_site_name }}
{% endblock %}
{% block content %}
<h1>{% trans "Manage Authentication Tokens" %}</h1>
{{ new_token_message }}
{% if not tokens %}
<div class="relate-well">
{% trans "(No tokens have been created yet.)" %}
</div>
{% else %}
<table class="table table-condensed">
<thead>
<th>{% trans "Token ID" %}</th>
<th>{% trans "Role Restriction" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Created" %}</th>
<th>{% trans "Valid until" %}</th>
<th>{% trans "Last used" %}</th>
<th>{% trans "Actions" %}</th>
</thead>
<tbody>
{% for token in tokens %}
<tr>
<td>
{% if token.revocation_time %}
<s>{{ token.id }}</s>
{% else %}
{{ token.id }}
{% endif %}
</td>
<td>{{ token.restrict_to_participation_role }}</td>
<td>
{% if token.revocation_time %}
<s>{{ token.description }}</s>
{% else %}
{{ token.description }}
{% endif %}
</td>
<td>{{ token.creation_time }}</td>
{% if token.revocation_time != None %}
<td>{% trans "Revoked" %} {{ token.revocation_time }}</td>
{% elif token.valid_until == None %}
<td>{% trans "Indefinitely" %}</td>
{% else %}
<td>{{ token.valid_until }}</td>
{% endif %}
<td>
{% if token.last_use_time %}
{{ token.last_use_time }}
{% else %}
{% trans "(never used)" %}
{% endif %}
</td>
<td>
{% if token.revocation_time == None %}
<form method="POST">
{% csrf_token %}
<button type="submit" class="btn btn-danger btn-sm" name="revoke_{{ token.id }}">
Revoke
</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="relate-well">
{% crispy form %}
</div>
{% endblock %}
......@@ -2,35 +2,53 @@
<table class="table table-striped gradebook-participants">
<thead>
<th class="datacol">{% trans "User ID" %}</th>
{% if not pperm.view_participant_masked_profile %}
<th class="datacol">{% trans "User ID" %}</th>
{% else %}
<th class="datacol">{% trans "User" %}</th>
{% endif %}
{% if pperm.edit_participation %}
<th class="datacol">{% trans "Actions" %}</th>
{% endif %}
<th class="datacol">{% trans "Status" %}</th>
<th class="datacol">{% trans "Name" context "real name of a user" %}</th>
{% if not pperm.view_participant_masked_profile %}
<th class="datacol">{% trans "Name" context "real name of a user" %}</th>
{% endif %}
<th class="datacol">{% trans "Role" %}</th>
<th class="datacol">{% trans "Institutional ID" %}</th>
{% if not pperm.view_participant_masked_profile %}
<th class="datacol">{% trans "Institutional ID" %}</th>
{% endif %}
<th class="datacol">{% trans "Tags" %}</th>
</thead>
<tbody>
{% for participation in participations %}
<tr class="relate-participation-{{ participation.status }}">
<td class="headcol"><a href="{% url "relate-view_participant_grades" course.identifier participation.id %}">
<span class="sensitive">{{ participation.user.username }}</span>
<span class="sensitive">
{% if not pperm.view_participant_masked_profile %}
{{ participation.user.username }}
{% else %}
{% if participation.user == user %}{% trans "Me" %}{% else %}{{ participation.user.get_masked_profile }}{% endif %}
{% endif %}
</span>
</a>
</td>
{% if pperm.edit_participation %}
<td class="datacol">
<a href="{% url "relate-edit_participation" course.identifier participation.id %}" class="btn btn-default btn-xs">{% trans "Edit" %}</a>
<a href="{% url "relate-edit_participation" course.identifier participation.id %}" class="btn btn-outline-secondary btn-sm">{% trans "Edit" %}</a>
</td>
{% endif %}
<td class="datacol">{% trans participation.status %}</td>
<td class="datacol"><span class="sensitive">{{ participation.user.get_full_name }}</span></td>
{% if not pperm.view_participant_masked_profile %}
<td class="datacol"><span class="sensitive">{{ participation.user.get_full_name }}</span></td>
{% endif %}
<td class="datacol">{{ participation.get_role_desc }}</td>
<td class="datacol"><span class="sensitive">{{ participation.user.institutional_id }}</span></td>
{% if not pperm.view_participant_masked_profile %}
<td class="datacol"><span class="sensitive">{{ participation.user.institutional_id }}</span></td>
{% endif %}
<td class="datacol">
{% for ptag in participation.tags.all %}
<span class="label label-default">{{ ptag.name }}</span>
<span class="badge rounded-pill text-bg-primary">{{ ptag.name }}</span>
{% endfor %}
</td>
</tr>
......@@ -38,14 +56,17 @@
</tbody>
</table>
{% load static coursetags %}
{% get_current_js_lang_name as LANG %}
<script type="text/javascript">
var tbl = $("table.gradebook-participants").dataTable({
"scrollCollapse": true,
"paging": false,
"ordering": true,
"columnDefs": [{ type: 'name', targets: 1 }],
"language": {url: '{% static "datatables-i18n/i18n/" %}{{LANG}}.json'},
} );
</script>
{% block participation_table_bottom_js %}
{% load static %}
{% get_current_js_lang_name as LANG %}
<script type="text/javascript">
var tbl = $("table.gradebook-participants").dataTable({
"scrollCollapse": true,
"paging": false,
"ordering": true,
"columnDefs": [{ type: 'name', targets: 1 }],
"language": rlDataTables.getI18nTable('{{ LANG}}'),
} );
</script>
{% endblock %}
{% load i18n %}
{% if not prev_grades %}
<li><h6 class="dropdown-header">{% trans 'No submission/grade history' %}</h6><li>
{% else %}
{% for grade in prev_grades %}
<li>
{% if forloop.first %}
<a class="dropdown-item" href="?">
{% else %}
<a class="dropdown-item" href="?grade_id={{ grade.id }}">
{% endif %}
{% if grade.id == prev_grade_id %}<b>{% endif %}
{{ grade.visit.visit_time }}
&middot;
{% trans "Grade:" %} {{ grade.grade_time }}
{% if grade.id == prev_grade_id %}</b>{% endif %}
{% if grade.value == none %}
[{% trans "no grade" %}]
{% else %}
[{{ grade.value }} {% trans "points" %}]
{% endif %}
{% if forloop.first %}(current){% endif %}
</a>
</li>
{% endfor %}
{% endif %}
......@@ -2,76 +2,76 @@
{{ prompt_html|safe }}
{% if show_setup_code and setup_code%}
<div class="panel panel-default" markdown="block">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#grading-setup-code">
{# Translators: "set-up" stands for set-up code for code question #}
{% trans "Problem set-up code" %}
<span style="font-size:x-small">{% trans "(click to view)" %}</span>
<div class="card mb-3" markdown="block">
<div class="card-header">
<h5 class="card-title dropdown-toggle">
<a class="text-decoration-none link-secondary"
data-bs-toggle="collapse" href="#grading-setup-code">
{# Translators: "set-up" stands for set-up code for code question #}
{% trans "Problem set-up code" %}
</a>
</h4>
</div>
<div id="grading-setup-code" class="panel-collapse collapse">
<div class="panel-body">
<p>
{% blocktrans trimmed %}
This is the code that is used to set up the problem and produce
test data for your submission. It is reproduced here for your
information, or if you would like to run your submission outside
of RELATE.
You should <em>not</em> copy/paste this code into the
code box below. This code is run automatically
'behind the scenes' before your submitted code.
{% endblocktrans%}
</p>
<pre>{{ setup_code }}</pre>
</div>
<div id="grading-setup-code" class="collapse">
<div class="card-body">
<p>
{% blocktrans trimmed %}
This is the code that is used to set up the problem and produce
test data for your submission. It is reproduced here for your
information, or if you would like to run your submission outside
of {{ relate_site_name }}.
You should <em>not</em> copy/paste this code into the
code box below. This code is run automatically
'behind the scenes' before your submitted code.
{% endblocktrans%}
</p>
<pre>{{ setup_code }}</pre>
</div>
</div>
</div>
{% endif %}
{% if show_test_code and test_code %}
<div class="panel panel-default" markdown="block">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#grading-test-code">
{% trans "Testing code" %}
<span style="font-size:x-small">{% trans "(click to view)" %}</span>
</a>
</h4>
<div class="card mb-3" markdown="block">
<div class="card-header">
<h5 class="card-title dropdown-toggle">
<a class="text-decoration-none link-secondary"
data-bs-toggle="collapse" href="#grading-test-code" aria-expanded="false" aria-controls="starter-code">
{% trans "Testing code" %}
</a>
</h5>
</div>
<div id="grading-test-code" class="panel-collapse collapse">
<div class="panel-body">
<p>
{% blocktrans trimmed %}
This is the code that is used to generate feedback for your
submission. It is reproduced here for your information, or
if you would like to run your submission outside of RELATE.
You should <em>not</em> copy/paste this code into the
code box below. This code is run automatically
'behind the scenes' after your submitted code.
{% endblocktrans%}
</p>
<pre>{{ test_code }}</pre>
</div>
<div id="grading-test-code" class="collapse">
<div class="card-body">
<p>
{% blocktrans trimmed %}
This is the code that is used to generate feedback for your
submission. It is reproduced here for your information, or
if you would like to run your submission outside of {{ relate_site_name }}.
You should <em>not</em> copy/paste this code into the
code box below. This code is run automatically
'behind the scenes' after your submitted code.
{% endblocktrans%}
</p>
<pre>{{ test_code }}</pre>
</div>
</div>
</div>
{% endif %}
{% if initial_code %}
<div class="panel panel-default" markdown="block">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#starter-code">
{# Translators: starter code for code question #}
{% trans "Starter code" %}
<span style="font-size:x-small">{% trans "(click to view)" %}</span>
</a>
</h4>
<div class="card mb-3" markdown="block">
<div class="card-header">
<h5 class="card-title dropdown-toggle">
<a class="text-decoration-none link-secondary"
data-bs-toggle="collapse" href="#starter-code" aria-expanded="false" aria-controls="starter-code">
{# Translators: starter code for code question #}
{% trans "Starter code" %}
</a>
</h5>
</div>
<div id="starter-code" class="panel-collapse collapse">
<div class="panel-body">
<div id="starter-code" class="collapse">
<div class="card-body">
<pre>{{ initial_code }}</pre>
</div>
</div>
......
{% extends "course/course-base.html" %}
{% extends "course/course-datatables.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %}
{% trans "Query Participations" %} - {% trans "RELATE" %}
{% endblock %}
{% block header_extra %}
{% include "datatables-header.html" %}
{% trans "Query Participations" %} - {{ relate_site_name }}
{% endblock %}
{% block content %}
<h1>{% trans "Query Participations" %}</h1>
<div class="well">
<div class="relate-well">
{% crispy form %}
</div>
......
{% extends "course/course-base.html" %}
{% extends "course/course-base-with-markup.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load static %}
{%block header_extra %}
<script src="{% static "codemirror/keymap/vim.js" %}"></script>
{% endblock %}
{% block content %}
<h1>{% trans "Markup Sandbox" %}</h1>
{% if preview_text %}
<div class="well">
<div class="relate-well">
<div style="max-height:700px; overflow-y:scroll">
{{ preview_text|safe }}
</div>
</div>
{% endif %}
<div class="well">
<div class="relate-well">
{% crispy form %}
</div>
{% endblock %}
......