mirror of
https://github.com/fsr/eseeva
synced 2024-11-15 00:43:12 +01:00
centralizes patrons to one file
questionnaire and patronGen use the same file
This commit is contained in:
parent
6a27c9ed5e
commit
7f818f44ce
|
@ -57,4 +57,4 @@ Just go to the *analysis.php* site to see the results. Go to *analysisTut.php* t
|
||||||
* **questionnaires/** Directory for all questionnaire files.
|
* **questionnaires/** Directory for all questionnaire files.
|
||||||
* **student_questionnaire.txt**: Questionnaire file for students.
|
* **student_questionnaire.txt**: Questionnaire file for students.
|
||||||
* **tutor_questionnaire.txt**: Questionnaire file for tutors.
|
* **tutor_questionnaire.txt**: Questionnaire file for tutors.
|
||||||
* **patrons.txt**: file for the names of the patrons.
|
* **patrons.txt**: File for the names of the patrons and information about their tutorial session.
|
||||||
|
|
|
@ -93,9 +93,13 @@
|
||||||
$lines = explode("\n", $rawData);
|
$lines = explode("\n", $rawData);
|
||||||
$data = array();
|
$data = array();
|
||||||
for ($i = 0; $i < count($lines); $i++)
|
for ($i = 0; $i < count($lines); $i++)
|
||||||
if(trim($lines[$i]) != "")
|
{
|
||||||
$data[trim($lines[$i])] = trim($lines[$i]);
|
if(trim($lines[$i]) != "" && trim($lines[$i])[0] != "#")
|
||||||
|
{
|
||||||
|
$tmp = explode(";", trim($lines[$i]));
|
||||||
|
$data[$tmp[0]] = $tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
|
@ -8,6 +8,7 @@
|
||||||
//============================================================================
|
//============================================================================
|
||||||
include_once 'libs/keyLib.php';
|
include_once 'libs/keyLib.php';
|
||||||
include_once 'libs/formLib.php';
|
include_once 'libs/formLib.php';
|
||||||
|
include_once 'libs/questionnaireLib.php';
|
||||||
|
|
||||||
// start a session prevent sending the same post twice
|
// start a session prevent sending the same post twice
|
||||||
// if the user refreshes the page, it will default to the
|
// if the user refreshes the page, it will default to the
|
||||||
|
@ -20,28 +21,9 @@
|
||||||
$keyFile = $_GET["keyFile"];
|
$keyFile = $_GET["keyFile"];
|
||||||
// holds the key data, generated from the key file
|
// holds the key data, generated from the key file
|
||||||
$keyData = ReadKeyFile($keyFile);
|
$keyData = ReadKeyFile($keyFile);
|
||||||
// the group names and rooms for Monday and their start times for Tuesday
|
// the group names and rooms for Monday and their start times for Tuesday, removes "Nicht am Tutorium teilgenommen"
|
||||||
$patrons = array(
|
$patrons = ReadPatronsFile(PATRONS);
|
||||||
array("Edsger W. Dijkstra", "APB/E005", "09:00"),
|
array_splice($patrons, 0, 1);
|
||||||
array("Kurt Gödel", "APB/E006", "09:10"),
|
|
||||||
array("Konrad Zuse", "APB/E007", "09:20"),
|
|
||||||
array("Tim Berners-Lee", "APB/E008", "09:30"),
|
|
||||||
array("John von Neumann", "APB/E009", "09:40"),
|
|
||||||
array("Donald E. Knuth", "APB/E010", "09:50"),
|
|
||||||
array("Alan Turing", "SCH/A214", "10:00"),
|
|
||||||
array("Ada Lovelace", "SCH/A252", "10:10"),
|
|
||||||
array("Grace Hopper", "SCH/A185", "10:20"),
|
|
||||||
array("Richard M. Stallman", "SCH/A184", "10:30"),
|
|
||||||
array("Linus Torvalds", "SCH/A419", "10:40"),
|
|
||||||
array("Noam Chomsky", "MER/03", "10:50"),
|
|
||||||
array("Christiane Floyd", "MER/01", "11:00"),
|
|
||||||
array("Stephen A. Cook", "GER/39", "11:10"),
|
|
||||||
array("Ken Thompson", "GER/09", "11:20"),
|
|
||||||
array("Marc Andreesen", "GER/54", "11:30"),
|
|
||||||
// we need slightly more Master tickets
|
|
||||||
array("Master Inf/MInf", "APB/E023", ""),
|
|
||||||
array("Master Inf/MInf", "APB/E023", "")
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -56,17 +38,18 @@
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i < count($keyData); $i++)
|
for ($i = 0; $i < count($keyData); $i++)
|
||||||
{
|
{
|
||||||
$pno = $i%(count($patrons));
|
$pno = $i%(count(array_keys($patrons)));
|
||||||
|
$patron_name = array_keys($patrons)[$pno];
|
||||||
?>
|
?>
|
||||||
<div class="ticket">
|
<div class="ticket">
|
||||||
<div class="patron"><?php echo $patrons[$pno][0] ?></div>
|
<div class="patron"><?php echo $patron_name; ?></div>
|
||||||
<div class="tickettext">
|
<div class="tickettext">
|
||||||
<div class="ticketimg"><img src="css/ese-logo.png"/></div>
|
<div class="ticketimg"><img src="css/ese-logo.png"/></div>
|
||||||
<div class="room">Tutorium in <br><strong><?php echo $patrons[$pno][1] ?></strong></div>
|
<div class="room">Tutorium in <br><strong><?php echo $patrons[$patron_name][1]; ?></strong></div>
|
||||||
<div class="time">
|
<div class="time">
|
||||||
<?php
|
<?php
|
||||||
// don't display start date if there is none (Master case)
|
// don't display start date if there is none (Master case)
|
||||||
echo ($patrons[$pno][2]=="") ? " " : "Einschreibestart Dienstag <strong>".$patrons[$pno][2]." Uhr</strong>";
|
echo ($patrons[$patron_name][2]=="") ? " " : "Einschreibestart Dienstag <strong>".$patrons[$patron_name][2]." Uhr</strong>";
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -44,7 +44,7 @@ for ($i = 0; $i < count($keyData); $i++) {
|
||||||
<br />
|
<br />
|
||||||
<code><?php echo substr($keyData[$i][0], 0, 10) . "<br />" . substr($keyData[$i][0], 10, 19); ?></code>
|
<code><?php echo substr($keyData[$i][0], 0, 10) . "<br />" . substr($keyData[$i][0], 10, 19); ?></code>
|
||||||
</div>
|
</div>
|
||||||
<div class="evalink">Tutoren-Eva unter https://ese.ifsr.de/2015/eva/tut</div>
|
<div class="evalink">Tutoren-Eva unter https://ese.ifsr.de/2016/eva/tut</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
Nicht am Tutorium teilgenommen
|
# Key (Name); Place; Time
|
||||||
Edsger W. Dijkstra
|
# Time can be left "" for special cases
|
||||||
Kurt Gödel
|
Nicht am Tutorium teilgenommen;;
|
||||||
Konrad Zuse
|
Edsger W. Dijkstra; APB/E005; 09:00
|
||||||
Donald E. Knuth
|
Kurt Gödel; APB/E006; 09:10
|
||||||
John von Neumann
|
Konrad Zuse; APB/E007; 09:20
|
||||||
Tim Berners-Lee
|
Tim Berners-Lee; APB/E008; 09:30
|
||||||
Alan Turing
|
John von Neumann; APB/E009; 09:40
|
||||||
Ada Lovelace
|
Donald E. Knuth; APB/E010; 09:50
|
||||||
Grace Hopper
|
Alan Turing; SCH/A214; 10:00
|
||||||
Richard M. Stallman
|
Ada Lovelace; SCH/A252; 10:10
|
||||||
Linus Torvalds
|
Grace Hopper; SCH/A185; 10:20
|
||||||
Noam Chomsky
|
Richard M. Stallman; SCH/A184; 10:30
|
||||||
Christiane Floyd
|
Linus Torvalds; SCH/A419; 10:40
|
||||||
Stephen A. Cook
|
Noam Chomsky; MER/03; 10:50
|
||||||
Ken Thompson
|
Christiane Floyd; MER/01; 11:00
|
||||||
Marc Andreesen
|
Stephen A. Cook; GER/39; 11:10
|
||||||
Master Inf/MInf
|
Ken Thompson; GER/09; 11:20
|
||||||
|
Marc Andreesen; GER/54; 11:30
|
||||||
|
Master Inf/MInf; APB/E023;
|
||||||
|
Master Inf/MInf; APB/E023;
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
else
|
else
|
||||||
CreateKeyMessageBox($keyState);
|
CreateKeyMessageBox($keyState);
|
||||||
CreateQuestionnaireElement("code", $questionnaire, $_POST);
|
CreateQuestionnaireElement("code", $questionnaire, $_POST);
|
||||||
CreateQuestionnaireElement("tutorName", $questionnaire, $patrons);
|
CreateQuestionnaireElement("tutorName", $questionnaire, array_keys($patrons));
|
||||||
CreateQuestionnaireElement("legend", $questionnaire, $_POST);
|
CreateQuestionnaireElement("legend", $questionnaire, $_POST);
|
||||||
CreateAllQuestionElements($questionnaire, $_POST);
|
CreateAllQuestionElements($questionnaire, $_POST);
|
||||||
CreateQuestionnaireElement("comment", $questionnaire, $_POST);
|
CreateQuestionnaireElement("comment", $questionnaire, $_POST);
|
||||||
|
|
Loading…
Reference in a new issue