@@ -9,52 +9,54 @@ Analyze a pg file for use of old and current methods.
9
9
10
10
=over
11
11
12
- =item C<deprecated_macros > : a list of the macros that the problem uses that is in the C<macros/deprecated >
12
+ =item * C<deprecated_macros > : a list of the macros that the problem uses that is in the C<macros/deprecated >
13
13
folder.
14
14
15
- =item Positive features:
15
+ =item * Positive features:
16
16
17
- =over 10
17
+ =over
18
+
19
+ =item * Uses PGML
18
20
19
- =item Uses PGML
21
+ =item * Provides a solution
20
22
21
- =item Provides a solution
23
+ =item * Provides a hint
22
24
23
- =item Provides a hint
25
+ =item * Uses Scaffolds
24
26
25
- =item Uses Scaffolds
27
+ =item * Uses a custom checker
26
28
27
- =item Uses a custom checker
29
+ =item * Uses a multianswer
28
30
29
- =item Uses a multianswer
31
+ =item * Uses answer hints
30
32
31
- =item Uses answer hints
33
+ =item * Uses nicetables
32
34
33
- =item Uses nicetables
35
+ =item * Uses randomness
34
36
35
37
=back
36
38
37
39
=item Old and deprecated features
38
40
39
- =over 10
41
+ =over
40
42
41
- =item Use of BEGIN_TEXT/END_TEXT
43
+ =item * Use of BEGIN_TEXT/END_TEXT
42
44
43
- =item Include the C<TEXT(beginproblem) >
45
+ =item * Include the C<TEXT(beginproblem) >
44
46
45
- =item Include old tables (for example from C<unionTables.pl > )
47
+ =item * Include old tables (for example from C<unionTables.pl > )
46
48
47
- =item The use of C<num_cmp > , C<str_cmp > and C<fun_cmp > in lieu of using MathObjects
49
+ =item * The use of C<num_cmp > , C<str_cmp > and C<fun_cmp > in lieu of using MathObjects
48
50
49
- =item Including C<< Context()->TeXStrings >>
51
+ =item * Including C<< Context()->TeXStrings >>
50
52
51
- =item Calling C<loadMacros > more than once.
53
+ =item * Calling C<loadMacros > more than once.
52
54
53
- =item Using the line C< $showPartialCorrectAnswers = 1 > which is the default behavior and thus unnecessary.
55
+ =item * Using the line C< $showPartialCorrectAnswers = 1 > which is the default behavior and thus unnecessary.
54
56
55
- =item Using methods from C<PGchoicemacros.pl >
57
+ =item * Using methods from C<PGchoicemacros.pl >
56
58
57
- =item Inlcuding code or other text below the C<ENDDOCUMENT(); > line indicating the end of the problem.
59
+ =item * Inlcuding code or other text below the C<ENDDOCUMENT(); > line indicating the end of the problem.
58
60
59
61
=back
60
62
@@ -87,6 +89,7 @@ sub analyzePGcode ($code) {
87
89
custom_checker => 0,
88
90
multianswer => 0,
89
91
nicetables => 0,
92
+ randomness => 0,
90
93
contexts => { BaseN => 0, Units => 0, Boolean => 0, Reaction => 0 },
91
94
parsers =>
92
95
{ dropdown => 0, RadioButtons => 0, CheckboxList => 0, RadioMultianswer => 0, GraphTool => 0 },
@@ -236,6 +239,7 @@ sub analyzePGcode ($code) {
236
239
$features -> {positive }{multianswer } = 1 if $line =~ / MultiAnswer/ ;
237
240
$features -> {positive }{custom_checker } = 1 if $line =~ / checker\s *=>/ ;
238
241
$features -> {positive }{nicetables } = 1 if $line =~ / DataTable|LayoutTable/ ;
242
+ $features -> {positive }{randomness } = 1 if $line =~ / random\( |random_(\w +)\( |list_random\( / ;
239
243
240
244
}
241
245
return $features ;
0 commit comments