mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 22:59:28 +00:00
81 lines
2.0 KiB
Handlebars
81 lines
2.0 KiB
Handlebars
<section class='testPage'>
|
|
<section class='adminSection adminSection--buttons'>
|
|
{{#eq userType 'account'}}
|
|
<div class='classes__buttons'>
|
|
<form action='{{deleteLink}}' method='post' class='deleteForm'>
|
|
<input type='submit' class='btn btn--full btn--primary btn--lg' value='Delete'/>
|
|
</form>
|
|
</div>
|
|
{{/eq}}
|
|
</section>
|
|
<div class='adminSection'>
|
|
<div class='adminItem'>
|
|
<h2>Test Overview - {{ testName }}</h2>
|
|
<div>
|
|
{{#with class}}
|
|
<div>Class: <a href='/admin/class/{{id}}' class='hl'>{{name}}</a></div>
|
|
{{/with}}
|
|
<div>
|
|
Subject: <span class='hl'>{{subject}}</span>
|
|
</div>
|
|
<div>
|
|
Maximum mark: <span class='hl'>{{maxMark}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='adminSection'>
|
|
<div class='adminItem'>
|
|
<div class="adminItem__title">
|
|
<h2>
|
|
{{#eq userType 'account'}}
|
|
Results
|
|
{{else}}
|
|
Result
|
|
{{/eq}}
|
|
</h2>
|
|
{{#eq userType 'account'}}
|
|
{{> button style='full' colour='primary' to=resultsLink content='Manage results'}}
|
|
{{/eq}}
|
|
</div>
|
|
<div>
|
|
{{#if testResults.length}}
|
|
{{#each testResults}}
|
|
{{> testResult result=this userType=../userType edit=false }}
|
|
{{/each}}
|
|
{{else}}
|
|
{{#eq userType 'account'}}
|
|
You have not submitted any results yet
|
|
{{else}}
|
|
Your test result has not been submitted yet
|
|
{{/eq}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='adminSection'>
|
|
<div class='adminItem adminStats'>
|
|
<div class='adminItem__title'>
|
|
<h2>Statistics and Reports</h2>
|
|
{{> button style='full' colour='primary' to=reportsLink content='View All'}}
|
|
</div>
|
|
<div class='adminStats__stats'>
|
|
{{#each stats}}
|
|
{{> adminStat value=value text=text }}
|
|
{{/each}}
|
|
</div>
|
|
<div class='adminStats__graphs'>
|
|
{{> graph }}
|
|
{{> graph }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
document.querySelector('.deleteForm').addEventListener('submit', (e) => {
|
|
if (!confirm('Delete test?'))
|
|
e.preventDefault();
|
|
});
|
|
</script>
|