Difference between revisions of "ManyMultipleChoice1"
Paultpearson (talk | contribs) |
(add historical tag and give links to newer problems.) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{historical}} |
||
+ | |||
+ | <p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Misc/ManyMultipleChoice.html a newer version of this problem]</p> |
||
+ | |||
+ | |||
<h2>A List of Many Multiple Choice Questions with Common Answers</h2> |
<h2>A List of Many Multiple Choice Questions with Common Answers</h2> |
||
Line 5: | Line 10: | ||
This PG code shows how to construct a list of many multiple choice questions that share common answers. |
This PG code shows how to construct a list of many multiple choice questions that share common answers. |
||
</p> |
</p> |
||
− | * Download file: [[File:ManyMultipleChoice1.txt]] (change the file extension from txt to pg when you save it) |
||
+ | * File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1.pg FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1.pg] |
||
− | * File location in NPL: <code>FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1.pg</code> |
||
+ | * PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1_PGML.pg FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1_PGML.pg] |
||
Line 185: | Line 190: | ||
<p> |
<p> |
||
<b>Solution:</b> |
<b>Solution:</b> |
||
+ | <br/>A method to match explanations with a shuffled list of matching problems is presented in |
||
+ | [[MatchingProblems|Matching Problems]] |
||
</p> |
</p> |
||
</td> |
</td> |
||
Line 196: | Line 203: | ||
[[Category:Top]] |
[[Category:Top]] |
||
− | [[Category:Authors]] |
||
[[Category:Sample Problems]] |
[[Category:Sample Problems]] |
||
[[Category:Subject Area Templates]] |
[[Category:Subject Area Templates]] |
Latest revision as of 06:20, 17 July 2023
This problem has been replaced with a newer version of this problem
A List of Many Multiple Choice Questions with Common Answers
This PG code shows how to construct a list of many multiple choice questions that share common answers.
- File location in OPL: FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1.pg
- PGML location in OPL: FortLewis/Authoring/Templates/Misc/ManyMultipleChoice1_PGML.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGchoicemacros.pl", "PGgraders.pl", ); TEXT(beginproblem()); |
Initialization:
We use |
Context("Numeric"); # Create and use pop up lists $tf = new_select_list(); $tf->rf_print_q(~~&pop_up_list_print_q); # 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.", "False", "All differentiable functions are continuous.", "True", "All polynomials are differentiable.", "True", "All functions with positive derivatives are increasing.", "True", "All rational functions are continuous.", "False", "All exponential functions are differentiable.", "True", "All exponential functions are rational functions.", "False", ); # How many questions to use $tf->choose(6); |
Setup: We can choose how many of the questions will be presented to students. |
Context()->texStrings; BEGIN_TEXT Are the following statements true or false? $BR \{ $tf -> print_q() \} END_TEXT Context()->normalStrings; |
Main Text: |
$showPartialCorrectAnswers = 0; # # Incremental grader # install_problem_grader(~~&custom_problem_grader_fluid); $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 If you want a grader that awards full credit when all questions are correct and no credit otherwise, uncomment the standard problem grader. |
Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} You could put an explanation here. END_SOLUTION Context()->normalStrings; COMMENT("MathObject version."); ENDDOCUMENT(); |
Solution:
|