Add a stub API
This commit is contained in:
parent
dc2a338847
commit
08fe45abcb
18
txt.php
Normal file
18
txt.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
require_once("QuestionsFile.class.php");
|
||||||
|
|
||||||
|
header("Content-type: text/plain");
|
||||||
|
|
||||||
|
@$filter = $_GET["filter"];
|
||||||
|
|
||||||
|
$file = new QuestionsFile("questions.xml");
|
||||||
|
|
||||||
|
foreach($file->get_questions() as $q)
|
||||||
|
{
|
||||||
|
if (!empty($filter) && strtolower($q->getCourse()->getCode()) != $filter)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$a = $q->getAnswer();
|
||||||
|
echo $q->getQuestion()."\n > ".$a[0]."\n\n";
|
||||||
|
}
|
||||||
|
?>
|
Reference in New Issue
Block a user