Difference between revisions of "ManyMultipleChoice1"

From WeBWorK_wiki
Jump to navigation Jump to search
m (link to method for providing explanations)
m (better style for presenting link)
Line 186: Line 186:
<br/>A method to match explanations with a shuffled list of matching problems is presented in
<br/>A method to match explanations with a shuffled list of matching problems is presented in
[[MatchingProblems|Matching Problems]]

Revision as of 13:55, 9 March 2013

A List of Many Multiple Choice Questions with Common Answers

Click to enlarge

This PG code shows how to construct a list of many multiple choice questions that share common answers.

  • Download file: File:ManyMultipleChoice1.txt (change the file extension from txt to pg when you save it)
  • File location in NPL: FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1.pg

Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:




Initialization: We use PGchoicemacros.pl to construct the list of multiple choice items, and the custom problem grader fluid from PGgraders.pl for incremental grading.


# Create and use pop up lists 
$tf = new_select_list();

# Choices presented to students
$tf->ra_pop_up_list( [ 
"No answer" => "?", 
"True"  => "True", 
"False" => "False",

# Questions and answers
$tf -> qa ( 
"All continuous functions are differentiable.",
"All differentiable functions are continuous.",
"All polynomials are differentiable.",
"All functions with positive derivatives are increasing.",
"All rational functions are continuous.",
"All exponential functions are differentiable.",
"All exponential functions are rational functions.",

# How many questions to use

Setup: We can choose how many of the questions will be presented to students.

Are the following statements true or false? 
\{ $tf -> print_q() \}

Main Text:

$showPartialCorrectAnswers = 0;

#  Incremental grader
$ENV{'grader_numright'} = [2,4,6];
$ENV{'grader_scores'} = [0.3,0.6,1];
$ENV{'grader_message'} = "You can earn " .
"30% partial credit for 2 - 3 correct answers, and " .
"60% partial credit for 4 - 5 correct answers.";

#  All or nothing grader
# install_problem_grader(~~&std_problem_grader);

ANS( str_cmp( $tf->ra_correct_ans() ) );

Answer Evaluation: We must withhold feedback from students by setting $showPartialCorrectAnswers = 0; We use an incremental grader called custom_problem_grader_fluid. With this problem grader, you must specify the number of correct answers [2,4,6] and their corresponding scores [0.3,0.6,1] and update the grader message accordingly. The last entry in the array for grader_numright must be the total number of questions asked, and the last entry in the array for grader_scores must be 1 (otherwise nobody can earn full credit!).

If you want a grader that awards full credit when all questions are correct and no credit otherwise, uncomment the standard problem grader.

You could put an explanation here.

COMMENT("MathObject version.");


A method to match explanations with a shuffled list of matching problems is presented in Matching Problems

Templates by Subject Area