summaryrefslogtreecommitdiffstats
path: root/modules-available/exams
diff options
context:
space:
mode:
authorUdo Walter2017-09-11 18:47:54 +0200
committerUdo Walter2017-09-11 18:47:54 +0200
commitfebd89b7245b090cc32c8ebd4fab8e31e505c2d1 (patch)
tree961dacc336063ce6b7cfb135fc8c323aade5b02c /modules-available/exams
parent[internetaccess] added missing stylesheet (diff)
downloadslx-admin-febd89b7245b090cc32c8ebd4fab8e31e505c2d1.tar.gz
slx-admin-febd89b7245b090cc32c8ebd4fab8e31e505c2d1.tar.xz
slx-admin-febd89b7245b090cc32c8ebd4fab8e31e505c2d1.zip
[exams] fixed inconsistencies + made tables sortable
Diffstat (limited to 'modules-available/exams')
-rw-r--r--modules-available/exams/config.json2
-rw-r--r--modules-available/exams/lang/de/template-tags.json2
-rw-r--r--modules-available/exams/lang/en/module.json2
-rw-r--r--modules-available/exams/lang/en/template-tags.json12
-rw-r--r--modules-available/exams/page.inc.php2
-rw-r--r--modules-available/exams/templates/page-add-edit-exam.html14
-rw-r--r--modules-available/exams/templates/page-exams.html97
-rw-r--r--modules-available/exams/templates/page-upcoming-lectures.html88
8 files changed, 122 insertions, 97 deletions
diff --git a/modules-available/exams/config.json b/modules-available/exams/config.json
index 95d8aa3e..0780ebef 100644
--- a/modules-available/exams/config.json
+++ b/modules-available/exams/config.json
@@ -1,5 +1,5 @@
{
"category":"main.content",
- "dependencies": [ "locations", "js_vis", "bootstrap_datepicker", "bootstrap_timepicker", "bootstrap_multiselect"],
+ "dependencies": [ "locations", "js_vis", "js_stupidtable", "bootstrap_datepicker", "bootstrap_timepicker", "bootstrap_multiselect"],
"permission": "0"
}
diff --git a/modules-available/exams/lang/de/template-tags.json b/modules-available/exams/lang/de/template-tags.json
index e011ee20..650cfaa2 100644
--- a/modules-available/exams/lang/de/template-tags.json
+++ b/modules-available/exams/lang/de/template-tags.json
@@ -21,7 +21,9 @@
"lang_end_time": "Uhrzeit",
"lang_examModeDescription": "Hier k\u00f6nnen Sie bwLehrpool-R\u00e4ume zeitgesteuert in den Pr\u00fcfungsmodus versetzen. Im Pr\u00fcfungsmodus ist das Client-System st\u00e4rker abgeriegelt, sodass es sich zum Schreiben von E-Pr\u00fcfungen eignet. Nach dem Ein- bzw. Ausschalten des Pr\u00fcfungsmodus ist es notwendig, die Rechner in den betroffenen R\u00e4umen neuzustarten.",
"lang_global": "Global",
+ "lang_headingAddExam": "Zeitraum hinzuf\u00fcgen",
"lang_headingAllExamLectures": "Ausstehende Pr\u00fcfungsveranstaltungen (30 Tage)",
+ "lang_headingEditExam": "Zeitraum bearbeiten",
"lang_headingGraphicalOverview": "Grafische Darstellung",
"lang_headingMain": "bwLehrpool Pr\u00fcfungsmodus",
"lang_id": "ID",
diff --git a/modules-available/exams/lang/en/module.json b/modules-available/exams/lang/en/module.json
index a066b3aa..a2403da1 100644
--- a/modules-available/exams/lang/en/module.json
+++ b/modules-available/exams/lang/en/module.json
@@ -1,5 +1,5 @@
{
- "module_name": "Exam mode",
+ "module_name": "Exam Mode",
"title_add-exam": "Add exam",
"title_edit-exam": "Edit exam",
"warning_lecture_is_not_enabled": "Warning: Lecture is not enabled by tutor"
diff --git a/modules-available/exams/lang/en/template-tags.json b/modules-available/exams/lang/en/template-tags.json
index a4ae9325..a05dc29f 100644
--- a/modules-available/exams/lang/en/template-tags.json
+++ b/modules-available/exams/lang/en/template-tags.json
@@ -2,7 +2,7 @@
"lang_actions": "Actions",
"lang_addExam": "Add exam period",
"lang_addingBasedOnLecture": "Adding exam period based on lecture",
- "lang_allExamPeriods": "All exam periods",
+ "lang_allExamPeriods": "All Exam Periods",
"lang_autoLogin": "Skip login",
"lang_autoLoginInfo": "If this option is enabled, the login mask will not be shown and instead, an anonymous session is opened. This is useful if there is another authentication mechanism in place inside the VM, e.g. web-based (LMS). The user will see the vmChooser right away after booting up the computer. You can combine this option with the \"Automatically launched course\" feature, so the boot process is completely automated. Note that when using \"skip login\", no personalization like mapping of home directories is possible inside the VM without additional actions by the user and\/or creator of the VM.",
"lang_autoStartInfo": "Here you can select a course that will be launched automatically after the user logged in. This will skip the vmChooser screen, and directly start the couse selected here. This function can be combined with the \"skip login\" feature to further automate the boot-up process.",
@@ -15,15 +15,17 @@
"lang_deleteConfirmation": "Are you sure?",
"lang_description": "Description",
"lang_duration": "Duration",
- "lang_editExam": "Edit Exam Period",
+ "lang_editExam": "Edit exam period",
"lang_end": "End",
"lang_end_date": "End Date",
"lang_end_time": "Time",
"lang_examModeDescription": "Here you can define time spans during which selected rooms will be set to exam mode. In exam mode, the client computers are more locked down than usual so it is suitable for writing electronic exams.",
"lang_global": "Global",
- "lang_headingAllExamLectures": "Upcoming lectures marked as exams (30 days)",
- "lang_headingGraphicalOverview": "Graphical overview",
- "lang_headingMain": "bwLehrpool exam mode",
+ "lang_headingAddExam": "Add Exam Period",
+ "lang_headingAllExamLectures": "Upcoming Lectures Marked As Exams (30 Days)",
+ "lang_headingEditExam": "Edit Exam Period",
+ "lang_headingGraphicalOverview": "Graphical Overview",
+ "lang_headingMain": "bwLehrpool Exam Mode",
"lang_id": "ID",
"lang_lectureName": "Lecture name",
"lang_lectureOutOfRange": "Hint: Start or end date of given lecture lies outside of exam period given above",
diff --git a/modules-available/exams/page.inc.php b/modules-available/exams/page.inc.php
index 48af287a..692230b0 100644
--- a/modules-available/exams/page.inc.php
+++ b/modules-available/exams/page.inc.php
@@ -153,7 +153,7 @@ class Page_Exams extends Page
$exam['btnClass'] = 'btn-success';
$exam['liesInPast'] = true;
} else {
- $exam['btnClass'] = 'btn-default';
+ $exam['btnClass'] = 'btn-danger';
}
$exam['starttime_s'] = date('Y-m-d H:i', $exam['starttime']);
$exam['endtime_s'] = date('Y-m-d H:i', $exam['endtime']);
diff --git a/modules-available/exams/templates/page-add-edit-exam.html b/modules-available/exams/templates/page-add-edit-exam.html
index bf000df5..cb1578ad 100644
--- a/modules-available/exams/templates/page-add-edit-exam.html
+++ b/modules-available/exams/templates/page-add-edit-exam.html
@@ -1,8 +1,8 @@
{{#exam.examid}}
-<h1>{{lang_editExam}}</h1>
+<h1>{{lang_headingEditExam}}</h1>
{{/exam.examid}}
{{^exam.examid}}
-<h1>{{lang_addExam}}</h1>
+<h1>{{lang_headingAddExam}}</h1>
{{/exam.examid}}
{{#exam.displayname}}
<div class="alert alert-info">{{lang_addingBasedOnLecture}}:<br><b>{{exam.displayname}}</b></div>
@@ -110,7 +110,11 @@
<input type="hidden" name="action" value="save">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="examid" value="{{exam.examid}}">
- <button class="btn btn-success" type="submit">{{lang_save}}</button>
+ <div class="text-right" style="margin-bottom: 20px">
+ <button type="submit" id="saveButton" class="btn btn-primary" style="margin-right: 10px"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
+ <button type="button" id="cancelButton" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> {{lang_cancel}}</button>
+ </div>
+
</form>
<script type="application/javascript"><!--
@@ -214,5 +218,9 @@ document.addEventListener("DOMContentLoaded", function () {
}
});
+ $("#cancelButton").click(function () {
+ window.location.replace("?do=exams");
+ });
+
}, false);
// --></script>
diff --git a/modules-available/exams/templates/page-exams.html b/modules-available/exams/templates/page-exams.html
index fc88e4f4..18dd1ab2 100644
--- a/modules-available/exams/templates/page-exams.html
+++ b/modules-available/exams/templates/page-exams.html
@@ -1,52 +1,59 @@
<h2>{{lang_allExamPeriods}}</h2>
<div class="slx-space">
- <table class="table">
- <tr>
- <th>{{lang_id}}</th>
- <th>{{lang_locations}}</th>
- <th>{{lang_begin}}</th>
- <th>{{lang_end}}</th>
- <th>{{lang_actions}}</th>
- </tr>
- {{#exams}}
- <tr class="{{rowClass}}">
- <td>{{examid}}</td>
- <td>
- {{locationnames}}
- {{^locationnames}}
- <i>{{lang_global}}</i>
- {{/locationnames}}
- {{#lecturename}}
- <div>
- <b>{{lang_autostart}}</b>: {{lecturename}}
- </div>
- {{/lecturename}}
- <div class="small">
- {{description}}
- {{^description}}
- <i>{{lang_noDescription}}</i>
- {{/description}}
- </div>
- </td>
- <td class="text-nowrap">{{starttime_s}}</td>
- <td class="text-nowrap">{{endtime_s}}</td>
- <td class="text-nowrap text-right">
- <form method="POST" action="?do=exams&action=delete" {{^liesInPast}}onsubmit="return confirm('{{lang_deleteConfirmation}}');"{{/liesInPast}} >
- {{^liesInPast}}
- <a onclick="slxShow({{starttime}}, {{endtime}})" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-eye-open"></span></a>
- {{/liesInPast}}
- <a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm" >{{lang_edit}}</a>
- <input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="examid" value="{{examid}}">
- <button class="btn {{btnClass}} btn-sm">{{lang_delete}}</button>
- </form>
- </td>
- </tr>
- {{/exams}}
+ <table class="table stupidtable">
+ <thead>
+ <tr>
+ <th data-sort="int">{{lang_id}}</th>
+ <th data-sort="string">{{lang_locations}}</th>
+ <th data-sort="int">{{lang_begin}}</th>
+ <th data-sort="int">{{lang_end}}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#exams}}
+ <tr class="{{rowClass}}">
+ <td>{{examid}}</td>
+ <td>
+ {{locationnames}}
+ {{^locationnames}}
+ <i>{{lang_global}}</i>
+ {{/locationnames}}
+ {{#lecturename}}
+ <div>
+ <b>{{lang_autostart}}</b>: {{lecturename}}
+ </div>
+ {{/lecturename}}
+ <div class="small">
+ {{description}}
+ {{^description}}
+ <i>{{lang_noDescription}}</i>
+ {{/description}}
+ </div>
+ </td>
+ <td class="text-nowrap" data-sort-value={{starttime}}>{{starttime_s}}</td>
+ <td class="text-nowrap" data-sort-value={{endtime}}>{{endtime_s}}</td>
+ <td class="text-nowrap text-right">
+ <form method="POST" action="?do=exams&action=delete" {{^liesInPast}}onsubmit="return confirm('{{lang_deleteConfirmation}}');"{{/liesInPast}} >
+ {{^liesInPast}}
+ <a onclick="slxShow({{starttime}}, {{endtime}})" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-eye-open"></span></a>
+ {{/liesInPast}}
+ <a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm" >{{lang_edit}}</a>
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="examid" value="{{examid}}">
+ <button class="btn {{btnClass}} btn-sm">{{lang_delete}}</button>
+ </form>
+ </td>
+ </tr>
+ {{/exams}}
+ </tbody>
</table>
</div>
-<div class="btn-group" role="group">
- <a href="?do=exams&action=add" class="btn btn-success">{{lang_addExam}}</a>
+<div class="text-right" style="margin-bottom: 20px">
+ <div class="btn-group" role="group">
+ <a href="?do=exams&action=add" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{lang_addExam}}</a>
+ </div>
</div>
+
diff --git a/modules-available/exams/templates/page-upcoming-lectures.html b/modules-available/exams/templates/page-upcoming-lectures.html
index 323b1017..b8c47725 100644
--- a/modules-available/exams/templates/page-upcoming-lectures.html
+++ b/modules-available/exams/templates/page-upcoming-lectures.html
@@ -1,46 +1,52 @@
<h2>{{lang_headingAllExamLectures}}</h2>
<div class="slx-space">
- <table class="table">
- <tr>
- <th>{{lang_lectureName}}</th>
- <th>{{lang_timeFrame}}</th>
- <th>{{lang_actions}}</th>
- </tr>
- {{#pending_lectures}}
- <tr class="{{class}}">
- <td>
- {{displayname}}
- <div class="small">
- <a href="mailto:{{email}}">{{lastname}}, {{firstname}}</a>
- </div>
- </td>
- <td width="30%" class="text-nowrap">
- {{starttime_s}} &ensp; {{endtime_s}}
- <div class="small">
- {{lang_duration}}: {{duration_s}}
- {{^duration_s}}{{lang_moreThanOneDay}}{{/duration_s}}
- </div>
- </td>
- <td width="20%">
- <div class="pull-right text-nowrap">
- <a class="btn btn-sm btn-default" role="button" onclick="slxShow({{starttime}}, {{endtime}})"><span class="glyphicon glyphicon-eye-open"></span></a>
- <a href="?do=exams&amp;action=add&amp;lectureid={{lectureid}}" class="btn btn-sm btn-default" role="button">
- <span class="glyphicon glyphicon-plus-sign"></span>
- <span class="hidden-sm">{{lang_addExam}}</span>
- </a>
- </div>
- </td>
- </tr>
- {{/pending_lectures}}
- {{#decollapse}}
- <tr class="slx-decollapse">
- <td colspan="3">
- <span class="btn-group btn-group-justified">
- <span class="btn btn-default btn-sm"><span class="glyphicon glyphicon-menu-down"></span></span>
- </span>
- </td>
- </tr>
- {{/decollapse}}
+ <table class="table stupidtable">
+ <thead>
+ <tr>
+ <th data-sort="string">{{lang_lectureName}}</th>
+ <th data-sort="int">{{lang_timeFrame}}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#pending_lectures}}
+ <tr class="{{class}}">
+ <td>
+ {{displayname}}
+ <div class="small">
+ <a href="mailto:{{email}}">{{lastname}}, {{firstname}}</a>
+ </div>
+ </td>
+ <td data-sort-value={{starttime}} width="30%" class="text-nowrap">
+ {{starttime_s}} &ensp; {{endtime_s}}
+ <div class="small">
+ {{lang_duration}}: {{duration_s}}
+ {{^duration_s}}{{lang_moreThanOneDay}}{{/duration_s}}
+ </div>
+ </td>
+ <td width="20%">
+ <div class="pull-right text-nowrap">
+ <a class="btn btn-sm btn-default" role="button" onclick="slxShow({{starttime}}, {{endtime}})"><span class="glyphicon glyphicon-eye-open"></span></a>
+ <a href="?do=exams&amp;action=add&amp;lectureid={{lectureid}}" class="btn btn-sm btn-default" role="button">
+ <span class="glyphicon glyphicon-plus-sign"></span>
+ <span class="hidden-sm">{{lang_addExam}}</span>
+ </a>
+ </div>
+ </td>
+ </tr>
+ {{/pending_lectures}}
+ </tbody>
+ <tfoot>
+ {{#decollapse}}
+ <tr class="slx-decollapse">
+ <td colspan="3">
+ <span class="btn-group btn-group-justified">
+ <span class="btn btn-default btn-sm"><span class="glyphicon glyphicon-menu-down"></span></span>
+ </span>
+ </td>
+ </tr>
+ {{/decollapse}}
+ </tfoot>
</table>
</div> \ No newline at end of file