A quiz with 4 questions, just one is correct. This repository is an optional module for the "lerntools". For installation and configuration, please see the documentation in https://codeberg.org/lerntools/base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

59 lines
1.3 KiB

<template>
<div>
<page-title :title="abcd.title" :subtitle="$t('title')"/>
<div class="container mt-6">
<warning-list v-if="warnings" :warnings="warnings"/>
<show-question v-for="question in abcd.questions" :question="question" :key="question.id"/>
</div>
</div>
</template>
<script>
import PageTitle from 'Main/components/PageTitle.vue';
import WarningList from 'Main/components/WarningList.vue';
import ShowQuestion from '../components/ShowQuestion.vue';
import color from 'Main/js/color.js';
import md from 'Main/js/markdown.js';
export default {
components:{PageTitle,ShowQuestion,WarningList},
data:function() {
return {
abcd:{},
md:md,
helpText:false,
warnings:false
}
},
mounted: function() {
var ticket=this.$route.params.ticket;
this.$axios.get('abcd/part/sets/'+ticket).then(response=> {
if (response.data[0]) return this.warnings=response.data;
this.abcd=response.data;
})
},
updated: function() {
color.setBgVar();
},
}
</script>
<style src='../../../node_modules/katex/dist/katex.min.css'/>
<i18n>
{
"de": {
"title": "ABCD-Quiz",
"answer-correct": "Sehr gut – richtig!",
"answer-wrong": "Leider falsch ..."
},
"en": {
"title": "ABCD-Quiz",
"answer-correct": "Very good - right!",
"answer-wrong": "Sorry, wrong answer"
}
}
</i18n>