Skip to content

Commit 381d4eb

Browse files
committed
Add randomness to the list of criteria to be checked.
1 parent 2970c88 commit 381d4eb

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,35 @@
3333
<tbody>
3434
% if ($pos->{PGML}) {
3535
<tr><th>PGML</th><td>This problem uses PGML, the current preferred way to write problem (text), solution and hint
36-
blocks.</td></tr>
36+
blocks.</td></tr>
3737
% }
3838
% if ($pos->{solution}) {
3939
<tr><th>Solutions</th><td>This problem has a solution block. Every problem should have solutions that the
40-
student can view after the answer data. </td></tr>
40+
student can view after the answer data. </td></tr>
4141
% }
4242
% if ($pos->{hint}) {
4343
<tr><th>Hints</th><td>This problem has a hint. This can be helpful for students after attempting the problem
44-
a few times (this can be set by the instructor).
44+
a few times (this can be set by the instructor).
45+
% }
46+
% if ($pos->{randomness}) {
47+
<tr><th>Randomness</th><td>This problem uses randomness. This is desired to give to a class of students, each
48+
of whom may have a different problem. </td>
4549
% }
4650
% # list of the positive contexts:
4751
% my @good_contexts = grep { $pos->{contexts}{$_} } keys %{$pos->{parsers}};
4852
% if (@good_contexts) {
4953
<tr><th>Modern Contexts</th><td>This problem uses the following modern contexts:
50-
<%= join(', ', @good_contexts) %> </td>
54+
<%= join(', ', @good_contexts) %> </td>
5155
% }
5256
% my @good_parsers = grep { $pos->{parsers}->{$_} } keys %{$pos->{parsers}};
5357
% if (@good_parsers) {
5458
<tr><th>Modern Parsers</th><td>This problem uses features of the following modern parsers:
55-
<%= join(', ', @good_parsers) %> </td>
59+
<%= join(', ', @good_parsers) %> </td>
5660
% }
5761
% my @good_macros = grep { $pos->{macros}->{$_} } keys %{$pos->{macros}};
5862
% if (@good_macros) {
5963
<tr><th>Modern Macros</th><td>This problem uses functionality from the following modern macros:
60-
<%= join(', ', @good_macros) %> </td>
64+
<%= join(', ', @good_macros) %> </td>
6165
% }
6266
</tbody>
6367
</table>
@@ -68,25 +72,24 @@
6872
<p>This problem has the following deprecated macros: <%= join(', ',@{$results->{deprecated_macros}} ) %> </p>
6973

7074
<p>These should be removed from the problem in that these macros will be deleted from PG in a future
71-
version. The functions from these macros may be listed below to help aid in transitioning away from
72-
these macros. </p>
75+
version. The functions from these macros may be listed below to help aid in transitioning away from
76+
these macros. </p>
7377
% }
7478

7579
% my $has_bad_features = 0;
7680
% $has_bad_features += $results->{negative}{$_} for (keys %{$results->{negative}});
7781

7882
% if ($has_bad_features || !$pos->{solution}) {
79-
<h3>You can improve on the following:</h3>
80-
<p> There are features in this problem that contain old or deprecated features. The following
81-
list gives feedback of how the problem can be improved. </p>
83+
<h3>You can improve on the following:</h3>
84+
<p> There are features in this problem that contain old or deprecated features. The following
85+
list gives feedback of how the problem can be improved. </p>
8286
%}
8387

8488
<ul>
8589
% if ($results->{negative}{BEGIN_TEXT}) {
8690
<li>This problem contains older formatting blocks like BEGIN_TEXT. Consider use PGML.
87-
In the <em>Format Code</em> section of the PG Editor, the "Convert to PGML" should be used
88-
as a start to get the problem switched.
89-
</li>
91+
In the <em>Format Code</em> section of the PG Editor, the "Convert to PGML" should be used
92+
as a start to get the problem switched.</li>
9093
%}
9194
% if ($results->{negative}{beginproblem}) {
9295
<li>This problem contains the line <tt>TEXT(beginproblem())</tt>. This is no longer necessary and should be removed. </li>
@@ -96,43 +99,46 @@ list gives feedback of how the problem can be improved. </p>
9699
%}
97100
% if ($results->{negative}{oldtable}) {
98101
<li>This problem contains the deprecated <tt>begintable</tt> command. This is not assessible and often cannot be
99-
converted to hardcopy. This table should be written using <tt>nicetables</tt> or a PGML table. </li>
102+
converted to hardcopy. This table should be written using <tt>nicetables</tt> or a PGML table. </li>
100103
%}
101104
% if ($results->{negative}{showPartialCorrect}) {
102105
<li>This problem contains the line <tt>$showPartialCorrectAnswers = 1</tt>. This is enabled by default and needed only
103-
if set to 0.</li>
106+
if set to 0.</li>
104107
% }
105108
% if (!$pos->{solution}) {
106109
<li>This problem does not have a solution. Consider adding one.</li>
107110
% }
111+
% if (!$pos->{randomness}) {
112+
<li>This problem does not have randomness. Consider adding variables that take on random values.</li>
113+
% }
108114
% if ($results->{negative}{fun_cmp} || $results->{negative}{str_cmp} || $results->{negative}{num_cmp}) {
109115
<li>This problem contains the functioins <tt>num_cmp</tt>, <tt>str_cmp</tt> or <tt>fun_cmp</tt>.
110-
These are old ways of checking answers. These should be converted to MathObjects.
116+
These are old ways of checking answers. These should be converted to MathObjects.
111117
% }
112118
% if ($results->{negative}{multiple_loadmacros}) {
113119
<li>This problem contains two <tt>loadMacros</tt> function call. Combine the function
114-
calls and make sure that all macros are needed for your problem. </li>
120+
calls and make sure that all macros are needed for your problem. </li>
115121
% }
116122
% if ($results->{negative}{macros}{PGchoicemacros}) {
117123
<li>This problem contains old versions of multiple choice. The sample problems
118-
<a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceCheckbox.html">
119-
Multiple Choice with Checkbox</a>, <a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoicePopup.html">
120-
Multiple Choice with Popup</a> and <a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceRadio.html">
121-
Multiple Choice with Radio Buttons</a> should be examined as well the macros:
122-
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserPopUp.html">parserPopUp.pl</a>,
123-
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserCheckboxList.html">parserCheckboxList.pl</a> and
124-
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserRadioButtons.html">parserRadioButtons.pl</a>.
124+
<a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceCheckbox.html">
125+
Multiple Choice with Checkbox</a>, <a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoicePopup.html">
126+
Multiple Choice with Popup</a> and <a target="_blank" href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceRadio.html">
127+
Multiple Choice with Radio Buttons</a> should be examined as well the macros:
128+
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserPopUp.html">parserPopUp.pl</a>,
129+
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserCheckboxList.html">parserCheckboxList.pl</a> and
130+
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserRadioButtons.html">parserRadioButtons.pl</a>.
125131

126132
</li>
127133
% }
128134
% if ($results->{negative}{macros}{PGgraphmacros}) {
129135
<li>This problem uses <tt>PGgraphmacros</tt> a old plotting library. Consider using
130-
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/graph/plots.html"><tt>Plots.pl</tt></a>
131-
or <a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/graph/PGtikz.html"><tt>PGtikz.pl</tt></a>
136+
<a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/graph/plots.html"><tt>Plots.pl</tt></a>
137+
or <a target="_blank" href="https://openwebwork.github.io/pg-docs/pod/pg/macros/graph/PGtikz.html"><tt>PGtikz.pl</tt></a></li>
132138
%}
133139
% if ($results->{negative}{lines_below_enddocument}) {
134140
<li>There is content (code or other text), below the <tt>ENDDOCUMENT()</tt> line. Although this
135-
is ignored, there shouldn't be content in this area.</li>
141+
is ignored, there shouldn't be content in this area.</li>
136142
% }
137143

138144
</ul>

0 commit comments

Comments
 (0)