|
| 1 | +<div class="m-3" style="overflow: scroll"> |
| 2 | +<h2>PG Critic Results</h2> |
| 3 | + |
| 4 | +<h3>Metadata</h3> |
| 5 | + |
| 6 | +<p>The following lists required metadata. If any is missing, the given tag must be filled in. |
| 7 | + However, make sure that the categories are correct, especially if the problem has been |
| 8 | + copied.</p> |
| 9 | + |
| 10 | +% sub showIcon { my $show = shift; |
| 11 | +% return $show ? q!<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square text-success" viewBox="0 0 16 16"> |
| 12 | +% <path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/> |
| 13 | +% <path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/> |
| 14 | +% </svg>! : q!<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-square text-danger" viewBox="0 0 16 16"> |
| 15 | +% <path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/> |
| 16 | +% <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/> |
| 17 | +% </svg>!; |
| 18 | +%} |
| 19 | + |
| 20 | +<table class="table table-bordered"> |
| 21 | +<tbody> |
| 22 | +<tr><th>DBsubject</th><td> <%== showIcon($results->{metadata}{DBsection}) %> </td></tr> |
| 23 | +<tr><th>DBchapter</th><td> <%== showIcon($results->{metadata}{DBchapter}) %> </td></tr> |
| 24 | +<tr><th>DBsection</th><td> <%== showIcon($results->{metadata}{DBsection}) %> </td></tr> |
| 25 | +<tr><th>Keywords</th><td> <%== showIcon($results->{metadata}{KEYWORDS}) %> </td></tr> |
| 26 | +</table> |
| 27 | + |
| 28 | +<h3>You done good with the following</h3> |
| 29 | + |
| 30 | +<table class="table table-bordered"> |
| 31 | +<tbody> |
| 32 | +% if ($results->{good}{PGML}) { |
| 33 | + <tr><th>PGML</th><td>This problem uses PGML, the current preferred way to write problem (text), solution and hint |
| 34 | + blocks.</td></tr> |
| 35 | +%} |
| 36 | +% if ($results->{good}{solution}) { |
| 37 | + <tr><th>Solutions</th><td>This problem has a solution block. Every problem should have solutions that the |
| 38 | + student can view after the answer data. </td></tr> |
| 39 | +%} |
| 40 | +% if ($results->{good}{hint}) { |
| 41 | + <tr><th>Hints</th><td>This problem has a hint. This can be helpful for students after attempting the problem |
| 42 | + a few times (this can be set by the instructor). |
| 43 | +%} |
| 44 | +</tbody> |
| 45 | +</table> |
| 46 | + |
| 47 | + |
| 48 | +% if( scalar(@{$results->{deprecated_macros}}) > 0) { |
| 49 | + <h3>Deprecated Macros</h3> |
| 50 | + <p>This problem has the following deprecated macros: <%= join(', ',@{$results->{deprecated_macros}} ) %> </p> |
| 51 | + |
| 52 | + <p>These should be removed from the problem in that these macros will be deleted from PG in a future |
| 53 | + version. The functions from these macros may be listed below to help aid in transitioning away from |
| 54 | + these macros. </p> |
| 55 | +% } |
| 56 | + |
| 57 | + |
| 58 | +% my $has_bad_features = 0; |
| 59 | +% $has_bad_features += $results->{bad}{$_} for (keys %{$results->{bad}}); |
| 60 | + |
| 61 | +% # <%== dumper $results->{bad} %> |
| 62 | + |
| 63 | +% if ($has_bad_features) { |
| 64 | +<h3>You can improve on the following:</h3> |
| 65 | +<p> There are features in this problem that contain old or deprecated features. The following |
| 66 | +list gives feedback of how the problem can be improved. </p> |
| 67 | +%} |
| 68 | + |
| 69 | +<ul> |
| 70 | +% if ($results->{bad}{BEGIN_TEXT}) { |
| 71 | + <li>This problem contains older formatting blocks like BEGIN_TEXT. Consider use PGML. |
| 72 | + In the <em>Format Code</em> section of the PG Editor, the "Convert to PGML" should be used |
| 73 | + as a start to get the problem switched. |
| 74 | + </li> |
| 75 | +%} |
| 76 | +% if ($results->{bad}{beginproblem}) { |
| 77 | + <li>This problem contains the line <tt>TEXT(beginproblem())</tt>. This is no longer necessary and should be removed. </li> |
| 78 | +%} |
| 79 | +% if ($results->{bad}{context_texstrings}) { |
| 80 | + <li>This problem contains the line <tt>Context()->texStrings;</tt>. This is no longer necessary and should be removed. </li> |
| 81 | +%} |
| 82 | +% if ($results->{bad}{oldtable}) { |
| 83 | + <li>This problem contains the deprecated <tt>begintable</tt> command. This is not assessible and often cannot be |
| 84 | + converted to hardcopy. This table should be written using <tt>nicetables</tt> or a PGML table. </li> |
| 85 | +%} |
| 86 | +% if ($results->{bad}{showPartialCorrect}) { |
| 87 | + <li>This problem contains the line <tt>$showPartialCorrectAnswers = 1</tt>. This is enabled by default and needed only |
| 88 | + if set to 0.</li> |
| 89 | +% } |
| 90 | +% if (!$results->{good}{solution}) { |
| 91 | + <li>This problem does not have a solution. Consider adding one.</li> |
| 92 | +% } |
| 93 | +% if ($results->{bad}{fun_cmp} || $results->{bad}{str_cmp} || $results->{bad}{num_cmp}) { |
| 94 | + <li>This problem contains the functioins <tt>num_cmp</tt>, <tt>str_cmp</tt> or <tt>fun_cmp</tt>. |
| 95 | + These are old ways of checking answers. These should be converted to MathObjects. |
| 96 | +% } |
| 97 | +% if ($results->{bad}{multiple_loadmacros}) { |
| 98 | + <li>This problem contains two <tt>loadMacros</tt> function call. Combine the function |
| 99 | + calls and make sure that all macros are needed for your problem. </li> |
| 100 | +% } |
| 101 | +% if ($results->{bad}{old_multiple_choice}) { |
| 102 | + <li>This problem contains old versions of multiple choice. The sample problems |
| 103 | + <a href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceCheckbox.html"> |
| 104 | + Multiple Choice with Checkbox</a>, <a href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoicePopup.html"> |
| 105 | + Multiple Choice with Popup</a> and <a href="https://openwebwork.github.io/pg-docs/sample-problems/Misc/MultipleChoiceRadio.html"> |
| 106 | + Multiple Choice with Radio Buttons</a> should be examined as well the macros: |
| 107 | + <a href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserPopUp.html">parserPopUp.pl</a>, |
| 108 | + <a href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserCheckboxList.html">parserCheckboxList.pl</a> and |
| 109 | + <a href="https://openwebwork.github.io/pg-docs/pod/pg/macros/parsers/parserRadioButtons.html">parserRadioButtons.pl</a>. |
| 110 | + |
| 111 | + </li> |
| 112 | +% } |
| 113 | +% if ($results->{bad}{lines_below_enddocument}) { |
| 114 | + <li>There is content (code or other text), below the <tt>ENDDOCUMENT()</tt> line. Although this |
| 115 | + is ignored, there shouldn't be content in this area.</li> |
| 116 | +% } |
| 117 | + |
| 118 | +</ul> |
| 119 | + |
| 120 | + |
| 121 | +</div> |
0 commit comments