Minor - Reformat code

skala
Julio Montoya 12 years ago
parent 94cbdc3dbb
commit 0835b10677
  1. 18
      tests/datafiller/fill_exe.php

@ -12,7 +12,8 @@
* internal functions.
* @return array List of user IDs for the users that have just been inserted
*/
function fill_exe() {
function fill_exe()
{
$qc = 5000; //how many questions to create per exercise
$eol = PHP_EOL;
$courses = array(); //declare only to avoid parsing notice
@ -63,12 +64,22 @@ function fill_exe() {
$question->type = $q['type'];
$question->course = $res;
$r = $question->save($id);
if ($r === false) { continue; }
if ($r === false) {
continue;
}
$qid = $question->id;
$aid = 1;
foreach ($q['answers'] as $asw) {
$answer = new UniqueAnswer($qid);
$answer->create_answer($aid,$qid,$asw['title'],'',$asw['score'],$asw['correct'], $res['real_id']);
$answer->create_answer(
$aid,
$qid,
$asw['title'],
'',
$asw['score'],
$asw['correct'],
$res['real_id']
);
$aid++;
}
$qi++;
@ -78,5 +89,6 @@ function fill_exe() {
}
}
}
return $output;
}

Loading…
Cancel
Save