来自数据库的学生文本

来自数据库的学生文本

我正在互联网上搜索一个能够从数据库(例如下面)生成学生考试的软件包,随机抽取问题(并打乱选项,创建一个包含正确问题的表格),但我找不到这样的软件包。

有人知道这样的包吗?

一切顺利,

罗杰里奥


问题一:一些精彩的文字

a) 答案 a - 正确

b) 答案 b - 错误

c) 答案 c- 错误

d) 答案 d- 错误

e) 答案 e- 错误

问题二:一些精彩的文字

a) 答案 a - 正确

b) 答案 b - 错误

c) 答案 c- 错误

d) 答案 d- 错误

e) 答案 e- 错误

等等....

答案1

是的,这是可能的。您可以使用examdesign+RndTexExams创建和完成随机考试。请参阅此链接https://cran.r-project.org/web/packages/RndTexExams/vignettes/rte-vignette_creating_exams.html并将示例放入此链接:https://gist.github.com/msperlin/ef1b93a8eb9026ba5e9a

\documentclass[10pt]{examdesign}

% loads all necessary packages (feel free to customize for your needs)

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{pifont}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{totpages}
\usepackage[margin=0.9in]{geometry}
\renewcommand{\headrulewidth}{0.0pt}
\usepackage{framed}

\SectionFont{\large\sffamily}
\Fullpages
\ContinuousNumbering
\DefineAnswerWrapper{}{}
\NumberOfVersions{1}

%\ShortKey      % shows a short key answer sheet
\NoKey          % Print key ?

\NoRearrange    % Random arrange with latex? (leave it UNCOMMENTED, R will do all of the dirty work)

\newcommand{\myversion}{} % this line is very important as it locates and allows the printed test to show the number of  the test (DONT DELETE IT)

% You probably want to change the next lines

\newcommand{\UniName}{Name of my University} 
\newcommand{\DeptName}{My Department} 
\newcommand{\ClassName}{My Class Name} 
\newcommand{\MyName}{Author: My name}
\newcommand{\ExamName}{Exam Name: Version \myversion}
\newcommand{\TermName}{Current Term}

\rfoot{Random test \# \myversion}

\begin{document}

\begin{examtop}

% detais of the exam (you should probably edit this!)
\begin{center}
    \textbf{\Large \UniName} \\
    \textbf{\Large \DeptName} \vspace{0.5cm}  \\
    \textbf{\Large \ClassName} \\
    \textbf{\Large \MyName} \\
    \textbf{\Large \ExamName } \\
    \textbf{\Large \TermName}
 \end{center}

\vspace{1cm}
Name: \rule{4in}{.4pt}  \quad  \noindent Card:\enspace\hrulefill

%\rule[1ex]{\textwidth}{2pt}

\vspace{1cm}

\small

\begin{framed}

Instructions for this test:

\begin{itemize}

    \item Make sure you finish before the end of the exam time

    \item There is only one correct answer in all multiple choice questions

    \item Don't cheat!

\end{itemize}

\vspace{0.5cm}

{\large \emph{Good Luck!}}
\end{framed}

\begin{framed}
    Instructions on how to use RndTexExams (DELETE THIS IN THE FINAL VERSION)
    \begin{itemize}

        \item The switch statements for the text of the questions, including main text and answers are defined as @{Text for version 1}|{Text for version 2}@. For each question, fell free to define as many versions as needed.

        \item You can define the right answer in each version of the test by assigning the character [!] or [ver] in the right answer for version ver. See the rest of the file for examples.


    \end{itemize}

\end{framed}

\end{examtop}


\vspace{1cm}

\begin{multiplechoice}[resetcounter=no,  examcolumns=1]

\begin{question}

    Which one is the correct answer in the next five alternatives?

    \choice{Choice 1}

    \choice{Choice 2}

    \choice{Choice 3}

    \choice{Choice 4}

    \choice[!]{Choice 5 - CORRECT}

\end{question}

\begin{question}

    Consider the following statements:

    \begin{enumerate}[I]
        \item The color of the sky is generally @{blue}|{red}@

        \item R has a @{high}|{low}@ number of packages for empirical research in Finance

        \item Microsoft word is @{better}|{worse}@ than latex for creating structured documents
    \end{enumerate}

    Are correct:

    \choice{[1] I and II}

    \choice{II and III}

    \choice{I, II and III}

    \choice{[2] Only III}

    \choice{Only I}

\end{question}


\begin{question}

    Which of the next answers do you think is the correct one? (there are three versions of this question. This is version @{1}|{2}|{3}@)

    \choice{Choice 1 - Incorrect in all versions}

    \choice{[1] Choice 2 - @{Correct in version 1}|{Incorrect in version 2}|{Incorrect in version 3}@}

    \choice{[3] Choice 3 - @{Incorrect in version 1}|{Incorrect in version 2}|{Correct in version 3}@}

    \choice{Choice 4 - Incorrect in all versions}

    \choice{[2] Choice 5 - @{Incorrect in version 1}|{Correct in version 2}|{Incorrect in version 3}@}

\end{question}


\begin{question}

    Consider the following statements:

    \begin{enumerate}[I]
        \item Latex is @{good}|{bad}@ for structured documents

        \item Working with R and latex is a @{good}|{bad}@ choice for writing up and marking tests

        \item We @{love}|{hate}@ R

    \end{enumerate}

    Which statements are true?

    \choice{I e II}
    \choice{[1] I, II e III}
    \choice{Only III}
    \choice{I e III}
    \choice{[2] None of the other options}

\end{question}


\end{multiplechoice}


\end{document}

您可以查看另一个链接:http://www.math.uakron.edu/~dpstory/eqexam.html或者https://www.sharelatex.com/learn/Typing_exams_in_LaTeX

答案2

您还可以查看esami基于 DP Story 包的包acrotex,它具有您想要的所有功能。

相关内容