DevPlace CI / test (push) Failing after 3h10m39s
Comment and post layouts stay full width on small screens. Secondary actions live in the More menu. Notifications can be grouped and throttled, and Enter can submit when that profile setting is on. Emulated-tool models accept large catalogs, with reserved names aliased on the wire and the catalog cached per owner. A dropped service-worker navigation is retried once. The test server waits 120s to finish importing before it is stopped.
96 lines
6.1 KiB
HTML
96 lines
6.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block extra_head %}
|
|
<link rel="stylesheet" href="{{ static_url('/static/css/post.css') }}">
|
|
<link rel="stylesheet" href="{{ static_url('/static/css/quiz.css') }}">
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="quiz-detail-page">
|
|
<a href="/quizzes" class="back-link">← Back to Quizzes</a>
|
|
|
|
<article class="quiz-detail">
|
|
{% if quiz.status == 'draft' %}
|
|
<div class="quiz-banner quiz-banner-draft" role="status">This quiz is a draft. Only you and administrators can see it.</div>
|
|
{% endif %}
|
|
|
|
<h1 class="quiz-detail-title rendered-title">{{ render_title(quiz.title, author_is_admin=is_admin(author)) }}</h1>
|
|
|
|
<div class="quiz-detail-author">
|
|
{% set _size = 32 %}{% set _size_class = "sm" %}{% set _user = author %}{% include "_avatar_link.html" %}
|
|
<div>
|
|
{% set _user = author %}{% set _class = none %}{% include "_user_link.html" %}
|
|
<span class="meta-muted meta-muted-spaced">· {{ dt_ago(quiz.created_at) if quiz.created_at else time_ago }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
{% if quiz.description %}
|
|
{% if maturity_hidden(maturity, user) %}
|
|
{% set _level = maturity %}{% include "_maturity_gate.html" %}
|
|
{% else %}
|
|
<div class="quiz-detail-desc rendered-content">{{ render_content(quiz.description, author_is_admin=is_admin(author)) }}</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<div class="quiz-stats-strip">
|
|
<div class="quiz-stat"><span class="quiz-stat-value">{{ quiz.question_count }}</span><span class="quiz-stat-label">Questions</span></div>
|
|
<div class="quiz-stat"><span class="quiz-stat-value">{{ quiz.total_points }}</span><span class="quiz-stat-label">Points</span></div>
|
|
<div class="quiz-stat"><span class="quiz-stat-value">{% if quiz.time_limit_seconds %}{{ format_duration(quiz.time_limit_seconds) }}{% else %}None{% endif %}</span><span class="quiz-stat-label">Time limit</span></div>
|
|
<div class="quiz-stat"><span class="quiz-stat-value">{% if quiz.pass_percent %}{{ quiz.pass_percent }}%{% else %}-{% endif %}</span><span class="quiz-stat-label">Pass mark</span></div>
|
|
<div class="quiz-stat"><span class="quiz-stat-value">{{ quiz.attempt_count }}</span><span class="quiz-stat-label">Attempts</span></div>
|
|
</div>
|
|
|
|
<div class="quiz-detail-actions">
|
|
{% if quiz.status == 'published' %}
|
|
{% if viewer_state == 'in_progress' and viewer_attempt_uid %}
|
|
<a href="{{ quiz.url }}/attempts/{{ viewer_attempt_uid }}" class="btn btn-primary">Resume attempt</a>
|
|
{% else %}
|
|
<form method="POST" action="{{ quiz.url }}/attempts" class="inline-form">
|
|
<button type="submit" class="btn btn-primary" {{ guest_disabled(user) }}>{% if viewer_state == 'done' %}Play again{% else %}Start quiz{% endif %}</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% set _type = "quiz" %}{% set _uid = quiz.uid %}{% set _my_vote = my_vote %}{% set _count = star_count %}{% set _btn_class = "btn btn-secondary" %}{% include "_star_vote.html" %}
|
|
<dp-action-menu class="quiz-actions-menu">
|
|
<button type="button" class="btn btn-secondary" data-action-menu-trigger aria-haspopup="menu" aria-expanded="false" aria-controls="quiz-actions-panel" aria-label="More actions">⋯ More</button>
|
|
<div class="action-menu-panel" id="quiz-actions-panel" data-action-menu-panel popover hidden>
|
|
{% if quiz.status == 'published' and viewer_state == 'done' and viewer_attempt_uid %}
|
|
<a href="{{ quiz.url }}/attempts/{{ viewer_attempt_uid }}/results" class="btn btn-secondary" data-menu-action>My results</a>
|
|
{% endif %}
|
|
{% if quiz.viewer_can_edit %}
|
|
<a href="{{ quiz.url }}/edit" class="btn btn-secondary" data-menu-action>Edit</a>
|
|
{% endif %}
|
|
<a href="{{ quiz.url }}/export" class="btn btn-secondary" data-menu-action>Export JSON</a>
|
|
{% set _type = "quiz" %}{% set _uid = quiz.uid %}{% set _bookmarked = bookmarked %}{% set _menu_action = true %}{% include "_bookmark_button.html" %}{% set _menu_action = false %}
|
|
{% set _type = "quiz" %}{% set _uid = quiz.uid %}{% set _owner = quiz.user_uid %}{% set _owner_name = (author or {}).get('username', '') %}{% set _class = "btn btn-secondary" %}{% set _menu_action = true %}{% include "_report_button.html" %}{% set _menu_action = false %}
|
|
{% if quiz.viewer_owns or is_admin(user) %}
|
|
<form method="POST" action="/quizzes/delete/{{ quiz.slug }}" class="inline-form">
|
|
<button type="submit" class="btn btn-danger" data-confirm="Delete this quiz and every attempt on it?" data-confirm-danger data-menu-action>Delete</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</dp-action-menu>
|
|
</div>
|
|
|
|
{% set _type = "quiz" %}{% set _uid = quiz.uid %}{% set _reactions = reactions %}{% include "_reaction_bar.html" %}
|
|
</article>
|
|
|
|
{% if leaderboard %}
|
|
<section id="leaderboard" class="quiz-leaderboard" aria-label="Quiz leaderboard">
|
|
<h2>Leaderboard</h2>
|
|
<ol class="quiz-leaderboard-list">
|
|
{% for entry in leaderboard %}
|
|
<li class="quiz-leaderboard-row">
|
|
<span class="quiz-rank">{{ entry.rank }}</span>
|
|
{% set _size = 28 %}{% set _size_class = "sm" %}{% set _user = entry.user %}{% include "_avatar_link.html" %}
|
|
<span class="quiz-leaderboard-name">{% set _user = entry.user %}{% set _class = none %}{% include "_user_link.html" %}</span>
|
|
<span class="quiz-score-chip">{{ format_number(entry.score_percent) }}%</span>
|
|
{% if entry.passed %}<span class="quiz-pass-badge">Passed</span>{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ol>
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% include "_comment_section.html" %}
|
|
</div>
|
|
{% endblock %}
|