LMSouq
moodle-core Open

Cloze with numerical and multiple-choice items

TE
tesis.pfc
1 month ago
3 views
Problem Description
I am using Moodle to make my subjects exams. I would like to mix a numerical cloze question, with a single-choice or a multiple-choice question. And each question should have different percentages on the final mark of the question, for example: first numerical question 5%, second numerical question 15%, third multichoice question 20% and so on. I made a `cloze_mchoice.Rnw` file: <<echo=FALSE, results=hide>>= @ \usepackage{Sweave} \usepackage[spanish]{babel} \usepackage[utf8]{inputenc} \SweaveOpts{pdf=false} \begin{question} % % This is the question. This is the question \begin{answerlist} \item Numerical answer 1. %Solution: 10 \item Numerical answer 2. %Solution: 20 \item Multiple choice answer 1. %true \item Multiple choice answer 2. %true \item Multiple choice answer 3. %false \item Multiple choice answer 4. %false \item Numerical answer 3. %Solution: 30 \item Numerical answer 4. %Solution: 35 \end{answerlist} % \end{question} \exname{cloze_mchoice} \extype{cloze} \exclozetype{num|num|mchoice|num|num} %percentage of rigth answer: % (5%-15%-20%-25%-35%) \exsolution{10|20|1100|30|35|} \extol{0.1*10|0.1*20|0.1*30|0.1*35} %Numerical Answer Tolerance First I use to compile in HTML but I receive this warning: exams2html("cloze_mchoice.Rnw", encoding = "UTF-8", template = "plain8") ## Warning message: ## In do.call(paste("as", type, sep = "."), list(rval)) : ## NAs introduced by coercion I have been trying to compile into `xml` using rmx <- exams2moodle("cloze_mchoice.Rnw", n = 1, name = "p_cloze_mchoice", mchoice = list(abstention = "No answer.")) but I received the same warning message shown above. The `p_cloze_mchoice.xml` file is not reading by Moodle. The file Rnw is a template, I will use a csv file to import input data and output data.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base