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.

121 lines
4.3 KiB

<page-title :title="$t('title')" :subtitle="$t('subtitle')" :button="$t('manual')" buttonhref='#/text-abcd-help'/>
<div class="container mt-3">
<wait-icon v-if="loading"/>
:items="allSets" :fields="['title','desc','subject','owner']"
resturl="abcd/sets" restkey="abcd"
v-on:start="start" v-on:edit="edit" v-on:share="share" v-on:export="exportJson" v-on:reload="loadMeta"
v-on:new="showModalCreate=true" />
<modal-dialog v-show="showModalCreate" v-on:accept="create()" v-on:close="showModalCreate=false">
<template v-slot:header>{{$t('create-new-set')}}</template>
<div class="form-group">
<input class="form-control" v-model="createTitle" :placeholder="$t('hint-title')">
<modal-share v-if="shareUrl" v-on:close="shareUrl=''" :url="shareUrl"/>
import PageTitle from 'Main/components/PageTitle.vue';
import ModalShare from 'Main/components/ModalShare.vue';
import ModalDialog from 'Main/components/ModalDialog.vue';
import WaitIcon from 'Main/components/WaitIcon.vue';
import IndexList from 'Main/components/ABCDList.vue';
import store from 'Main/js/store.js';
import download from 'Main/js/download.js';
import generator from 'Main/js/password-generator';
export default {
name: 'home',
components: { PageTitle, ModalShare, ModalDialog, WaitIcon, IndexList },
data: function() {
return {
mounted: function() {
if (!this.hasRole) return this.$router.push({name:'abcd-login'});
methods: {
share: function(set) {
var ticket=set.ticket;
var location=window.location.toString();
var base=location.substring(0,location.lastIndexOf('/'));
start: function(set) {
exportJson: async function(set) {
var abcd=await this.getSet(set)
getSet: async function(set) {
var response=await this.$axios.get('abcd/sets/'+set._id);
var abcd=Object.assign({}, response.data);
//remove unecessary information
delete abcd._id;
delete abcd.__v;
delete abcd.owner;
for (var question of abcd.questions) {
delete question._id;
return abcd;
create: function() {
edit: function(set) {
loadMeta: function() {
this.$axios.get('abcd/sets-meta').then(response=> {
"de": {
"title": "ABCD-Quiz",
"subtitle": "Ein ABCD-Quiz beinhaltet eine Reihe von Fragen, zu denen jeweils 4 Antworten angezeigt werden – aber nur eine dieser Antworten ist korrekt. Alle Teilnehmer beantworten die Fragen der Reihe nach, wobei pro Frage immer nur eine gewisse Zeitspanne vorgesehen ist. Weitere Informationen und Tipps zur Bedienung finden Sie in der Anleitung.",
"manual": "Anleitung",
"create-new-set": "Neue Fragensammlung anlegen",
"create-new-text1": "Fragensammlungen, die von Ihnen als „öffentlich“ gekennzeichnet sind, stehen allen anderen Nutzern unter der Lizenz CC-BY-SA zur Verfügung.",
"create-new-text2": "Außerdem können Sie Fragensammlungen über ein Ticket den Teilnehmern per Link zur Verfügung stellen."
"en": {
"title": "ABCD-Quiz",
"subtitle": "An ABCD quiz contains a series of questions, each containing 4 answers - but only one is correct. All participants answer the questions in turn, with only one period of time per question. For more information and tips on how to use it, see the instructions.",
"manual": "Manual",
"create-new-set": "Create new question set",
"create-new-text1": "Question collections that you mark as public are available to all other users under the CC-BY-SA license.",
"create-new-text2": "In addition, you can provide a collection of questions about a ticket to the participants via a link."