$default = ['title' => '',
'translation' => '1',
'scorm' => '1',
- 'review' => '1',
+ 'review' => 'always',
+ 'instantReview' => '1',
'threshold' => '0',
'owner' => auth()->user()->id];
$z = new ZipArchive();
$ok = $z->open($file);
if ($ok !== true) {
- Alert::warning('Unable to open '.$file)->flash();
+ Alert::warning('Unable to open ' . $file)->flash();
continue;
}
$data = [];
$datacontent = $z->getFromName('data.xml');
if (!$datacontent || stripos($datacontent, '<quiz') === false) {
- Alert::warning($file.' doesn\'t seem to be a valid quiz')->flash();
+ Alert::warning($file . ' doesn\'t seem to be a valid quiz')->flash();
continue;
}
$x = simplexml_load_string($datacontent, "SimpleXMLElement", LIBXML_NOERROR | LIBXML_ERR_NONE);
$questions = [];
foreach ($xquestions as $xquestion) {
$q = [
+ 'type' => 'multiple',
+ 'count_for_score' => true,
+ 'report_label' => '',
+ 'placeholder' => '',
+ 'min_score' => 0,
'question' => (string)$xquestion->label,
'explaination' => (string)$xquestion->correction,
'multiple' => isset($xquestion['multiple']) ? (bool)$xquestion['multiple'] : false,
$xml->addChild('threshold', $data->get('threshold', '0') ?: '0');
$xml->addChild('restart_button', $data->get('restart_button', '0') ? '1' : '0');
$xml->addChild('instantReview', $data->get('instantReview', true) ? '1' : '0');
- $xml->addChild('review', $data->get('review', true) ? '1' : '0');
+ $xml->addChild('review', $data->get('review', 'always'));
$xml->addChild('logattempts', $data->get('logattempts', false) ? '1' : '0');
$xt = $xml->addChild('translations');
/** @var QuizTranslation $translation */
return;
}
+
if ($(next).is("#resultsscreen")) {
+ updateScore();
+ console.log(showReview, checkScore())
var show = showReview === 'always' || (showReview === 'passed' && checkScore());
+ console.log(showReview, checkScore(), show, score);
if (!show) {
$('#correction').hide();
} else {