From e932a60cc2c61d5330a431587e0212e3b821825d Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 22 Jun 2023 17:51:59 -0500 Subject: [PATCH] Fix several things that were broken in recent revisions. Remove the CodeMirror eclipse theme, and just use the default. This is the same default used in the PGProblemEditor for webwork2, and is actually very similar to the eclipse theme. If you don't like the dark theme, then we should just use the default. Increase the width of the sidebar to fit the content. Make the dropdown show the correct label when the macros page is selected. Remove the "default" tab pane and hidden sidebar item. The instructions that were in the tab pane simply aren't needed. This is a straightforward page with not much else to do. In addition the hidden list-group-item completely messes up the sidebar appearance. Remove the duplicate "parserFormulaUpToConstant.pl" key in macro_pod.yml, and add the missing "parserAutoStrings.pl" macro that is referenced in "doc/sample-problems/problem-techniques/StringsInContext.pg". Since this was not in the yml file, this caused a use of uninitialized value in string concatenation warning, and obviously the link didn't work. Also fix several issues with the documentation in the graph tool problems. --- doc/css/sample-problem.css | 18 +-- .../Algebra/GraphToolCircle.pg | 9 +- doc/sample-problems/Algebra/GraphToolCubic.pg | 47 +++--- ...GraphTool.pg => GraphToolCustomChecker.pg} | 144 +++++++++--------- doc/sample-problems/Algebra/GraphToolLine.pg | 48 +++--- .../Algebra/GraphToolNumberLine.pg | 66 ++++---- .../Algebra/GraphToolPoints.pg | 27 ++-- doc/sample-problems/macro_pod.yaml | 2 +- doc/templates/general-layout.mt | 7 +- doc/templates/general-main.mt | 4 - doc/templates/general-sidebar.mt | 6 +- doc/templates/problem-template.mt | 21 +-- doc/templates/techniques-main.mt | 4 - doc/templates/techniques-sidebar.mt | 2 - 14 files changed, 200 insertions(+), 205 deletions(-) rename doc/sample-problems/Algebra/{GraphTool.pg => GraphToolCustomChecker.pg} (54%) diff --git a/doc/css/sample-problem.css b/doc/css/sample-problem.css index 67b898d8f8..66daac22e7 100644 --- a/doc/css/sample-problem.css +++ b/doc/css/sample-problem.css @@ -1,27 +1,27 @@ pre.CodeMirror { - background-color: #fcfaf1; + background-color: #fcfaf1; } .explanation { - --bs-code-color: #971556; + --bs-code-color: #971556; } .preamble { - background-color: lightblue; + background-color: lightblue; } .setup { - background-color: #ddffdd; + background-color: #ddffdd; } .statement { - background-color: #eeb08199; + background-color: #eeb08199; } .answer { - background-color: #ffffdd; + background-color: #ffffdd; } .solution { - background-color: #ffb6c199; + background-color: #ffb6c199; } .hint { - background-color: rgb(239, 207, 251); + background-color: rgb(239, 207, 251); } .perl { - color: darkred; + color: darkred; } diff --git a/doc/sample-problems/Algebra/GraphToolCircle.pg b/doc/sample-problems/Algebra/GraphToolCircle.pg index 0b69cd5569..2b0761e645 100644 --- a/doc/sample-problems/Algebra/GraphToolCircle.pg +++ b/doc/sample-problems/Algebra/GraphToolCircle.pg @@ -47,15 +47,16 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * `bbox`: this is an array reference of four values xmin, ymax, xmax, ymin +#: * `bBox`: This is an array reference of four values xmin, ymax, xmax, ymin #: indicating the upper left and lower right corners of the visible graph. #: #: There is a default checker for the GraphTool that will mark correct a -#: student answer that 'looks' like the correct one. This means that if +#: student answer that 'looks' like the correct one. This means that if #: a student adds two circles that are equivalent with one solid and one #: dashed, that if the solid one is plotted second, credit will be given. -#: For simple graphs, the default should be sufficient. If not see -#: XXXX for an example with a custom answer checker. +#: For simple graphs, the default should be sufficient. See +#: PROBLINK('GraphToolCustomChecker.pg') for an example of how to use a custom +#: checker. #: #: For more details, see the PODLINK('POD documentation','parserGraphTool.pl') $h = non_zero_random(-5, 5); diff --git a/doc/sample-problems/Algebra/GraphToolCubic.pg b/doc/sample-problems/Algebra/GraphToolCubic.pg index 1557ca18ef..dc02f1c6d0 100644 --- a/doc/sample-problems/Algebra/GraphToolCubic.pg +++ b/doc/sample-problems/Algebra/GraphToolCubic.pg @@ -1,5 +1,5 @@ ## DESCRIPTION -## Interactive graphing tool problem that asks the student to plot a circle. +## Interactive graphing tool problem that asks the student to plot a cubic. ## ENDDESCRIPTION ## DBsubject(WeBWorK) @@ -16,13 +16,16 @@ #:% categories = [graph] #:% section = preamble -#: This example shows how to get student input in the form of a graph (a circle) +#: This example shows how to get student input in the form of a graph (a cubic) #: by using interactive graphing tools. Load the parserGraphTool.pl macro for #: this. DOCUMENT(); -loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', - 'contextFraction.pl','PGcourse.pl'); +loadMacros( + 'PGstandard.pl', 'PGML.pl', + 'parserGraphTool.pl', 'contextFraction.pl', + 'PGcourse.pl' +); #:% section = setup #: A cubic is created with 3 random zeros and a random y-intercept. @@ -33,21 +36,21 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', #: of the attributes of the object. The first attribute in each list is the #: type of object to be graphed, `cubic` in this case. What the remaining #: attributes are depend on the type. For a cubic the second attribute is -#: whether the object is to be `solid` or `dashed`, the remaining arguments -#: are the 4 points of the cubic. +#: whether the object is to be `solid` or `dashed`, the remaining attributes +#: are four distinct points of the cubic. #: #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * bbox: this is an array reference of four values xmin, ymax, xmax, ymin +#: * `bBox`: This is an array reference of four values xmin, ymax, xmax, ymin #: indicating the upper left and lower right corners of the visible graph. -# * availableTools: this determines which tools should be shown on the -#: graph tool. +#: * `availableTools`: This determines which tools will be available for the +#: student to use. #: #: There is a default checker for the GraphTool that will mark correct a -#: student answer that 'looks' like the correct one. For simple graphs, -#: the default should be sufficient. If not see -#: XXXX for an example with a custom answer checker. +#: student answer that 'looks' like the correct one. For simple graphs, +#: the default should be sufficient. See PROBLINK('GraphToolCustomChecker.pg') +#: for an example of how to use a custom checker. Context('Fraction'); @@ -55,16 +58,20 @@ $x1 = random(-8, -4); $x2 = non_zero_random(-3, -3); $x3 = random(4, 8); -$y0 = non_zero_random(-3,3); - -$k = Fraction($y0,-$x1*$x2*$x3); +$y0 = non_zero_random(-3, 3); +$k = Fraction($y0, -$x1 * $x2 * $x3); -$gt = GraphTool("{cubic, solid, ($x1, 0), ($x2, 0), ($x3, 0), (0, $y0)}")->with( - bBox => [ -11, 11, 11, -11 ], - availableTools => - [ 'PointTool', 'LineTool', 'CircleTool', 'QuadraticTool', 'CubicTool', 'FillTool', 'SolidDashTool' ], -); +$gt = + GraphTool("{cubic, solid, ($x1, 0), ($x2, 0), ($x3, 0), (0, $y0)}")->with( + bBox => [ -11, 11, 11, -11 ], + availableTools => [ + 'PointTool', 'LineTool', + 'CircleTool', 'QuadraticTool', + 'CubicTool', 'FillTool', + 'SolidDashTool' + ], + ); #:% section = statement #: This asks to graph the cubic throw the given points. The code diff --git a/doc/sample-problems/Algebra/GraphTool.pg b/doc/sample-problems/Algebra/GraphToolCustomChecker.pg similarity index 54% rename from doc/sample-problems/Algebra/GraphTool.pg rename to doc/sample-problems/Algebra/GraphToolCustomChecker.pg index 10bab63659..93ccb7232d 100644 --- a/doc/sample-problems/Algebra/GraphTool.pg +++ b/doc/sample-problems/Algebra/GraphToolCustomChecker.pg @@ -1,5 +1,5 @@ ## DESCRIPTION -## Interactive graphing tool problems. +## Interactive graphing tool problem with a custom checker. ## ENDDESCRIPTION ## DBsubject(WeBWorK) @@ -10,15 +10,15 @@ ## Author(Glenn Rice) ## KEYWORDS('graphs', 'circles') -#:% name = Interactive graphing tool problems +#:% name = Graph Tool, custom checker #:% type = [Sample, technique] #:% subject = [algebra, precalculus] #:% categories = [graph] #:% section = preamble #: This example shows how to get student input in the form of a graph (a circle) -#: by using interactive graphing tools. Load the parserGraphTool.pl macro for -#: this. +#: by using interactive graphing tools, and demonstrates the usage of a custom +#: checker. Load the parserGraphTool.pl macro for this. DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); @@ -28,10 +28,10 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #: #: The lines #: -#:```{#equation .perl} +#: ```{#equation .perl} #: Context()->variables->add(y => 'Real'); #: $circle_eq_lhs = Formula("(x - $h)^2 + (y - $k)^2")->reduce; -#:``` +#: ``` #: #: define the equation of the circle that is shown in the problem and solution. #: @@ -47,16 +47,16 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * bbox: this is an array reference of four values xmin, ymax, xmax, ymin +#: * `bBox`: this is an array reference of four values xmin, ymax, xmax, ymin #: indicating the upper left and lower right corners of the visible graph. -#: * cmpOptions: this is a hash of options passed to the cmp method for checking +#: * `cmpOptions`: this is a hash of options passed to the cmp method for checking #: the answer. #: #: The option #: -#:```{#cmp-options .perl} +#: ```{#cmp-options .perl} #: cmpOptions => { list_checker => sub { ... } } -#:``` +#: ``` #: #: defines a list checker. The list checker is passed the `$correct` answer #: which will be a MathObject list of lists containing the attributes of the @@ -75,68 +75,68 @@ Context()->variables->add(y => 'Real'); $circle_eq_lhs = Formula("(x - $h)^2 + (y - $k)^2")->reduce; $gt = GraphTool("{circle, solid, ($h, $k), ($h + $r, $k)}")->with( - bBox => [ -11, 11, 11, -11 ], - cmpOptions => { - list_checker => sub { - my ($correct, $student, $ans, $value) = @_; - return 0 if $ans->{isPreview}; - - my $score = 0; - my @errors; - my $count = 1; - - # Get the center and point that define the correct circle and - # compute the square of the radius. - my ($cx, $cy) = $correct->[0]->extract(3)->value; - my ($px, $py) = $correct->[0]->extract(4)->value; - my $r_squared = ($cx - $px)**2 + ($cy - $py)**2; - - my $pointOnCircle = sub { - my $point = shift; - my ($x, $y) = $point->value; - return ($x - $cx)**2 + ($y - $cy)**2 == $r_squared; - }; - - # Iterate through the objects the student graphed and check to - # see if each is the correct circle. - for (@$student) { - my $nth = Value::List->NameForNumber($count++); - - # This checks if the object graphed by the student is the same - # type as the correct object type (a circle in this case), - # has the same solid or dashed status, has the same center, and - # if the other point graphed is on the circle. - if ($_->extract(1) eq $correct->[0]->extract(1) - && $_->extract(2) eq $correct->[0]->extract(2) - && $_->extract(3) == $correct->[0]->extract(3) - && $pointOnCircle->($_->extract(4))) - { - $score += 1; - next; - } - - # Add messages for incorrect answers. - - if ($_->extract(1) ne $correct->[0]->extract(1)) { - push(@errors, - "The $nth object graphed is not a circle"); - next; - } - - if ($_->extract(2) ne $correct->[0]->extract(2)) { - push(@errors, - "The $nth object graphed should be a " - . $correct->[0]->extract(2) - . " circle."); - next; - } - - push(@errors, "The $nth object graphed is incorrect."); - } - - return ($score, @errors); - } - } + bBox => [ -11, 11, 11, -11 ], + cmpOptions => { + list_checker => sub { + my ($correct, $student, $ans, $value) = @_; + return 0 if $ans->{isPreview}; + + my $score = 0; + my @errors; + my $count = 1; + + # Get the center and point that define the correct circle and + # compute the square of the radius. + my ($cx, $cy) = $correct->[0]->extract(3)->value; + my ($px, $py) = $correct->[0]->extract(4)->value; + my $r_squared = ($cx - $px)**2 + ($cy - $py)**2; + + my $pointOnCircle = sub { + my $point = shift; + my ($x, $y) = $point->value; + return ($x - $cx)**2 + ($y - $cy)**2 == $r_squared; + }; + + # Iterate through the objects the student graphed and check to + # see if each is the correct circle. + for (@$student) { + my $nth = Value::List->NameForNumber($count++); + + # This checks if the object graphed by the student is the same + # type as the correct object type (a circle in this case), + # has the same solid or dashed status, has the same center, and + # if the other point graphed is on the circle. + if ($_->extract(1) eq $correct->[0]->extract(1) + && $_->extract(2) eq $correct->[0]->extract(2) + && $_->extract(3) == $correct->[0]->extract(3) + && $pointOnCircle->($_->extract(4))) + { + $score += 1; + next; + } + + # Add messages for incorrect answers. + + if ($_->extract(1) ne $correct->[0]->extract(1)) { + push(@errors, + "The $nth object graphed is not a circle"); + next; + } + + if ($_->extract(2) ne $correct->[0]->extract(2)) { + push(@errors, + "The $nth object graphed should be a " + . $correct->[0]->extract(2) + . " circle."); + next; + } + + push(@errors, "The $nth object graphed is incorrect."); + } + + return ($score, @errors); + } + } ); #:% section = statement diff --git a/doc/sample-problems/Algebra/GraphToolLine.pg b/doc/sample-problems/Algebra/GraphToolLine.pg index d39eabd7ba..a569ba3ffa 100644 --- a/doc/sample-problems/Algebra/GraphToolLine.pg +++ b/doc/sample-problems/Algebra/GraphToolLine.pg @@ -1,5 +1,5 @@ ## DESCRIPTION -## Interactive graphing tool problem that asks the student to plot a circle. +## Interactive graphing tool problem that asks the student to plot a line. ## ENDDESCRIPTION ## DBsubject(WeBWorK) @@ -16,13 +16,12 @@ #:% categories = [graph] #:% section = preamble -#: This example shows how to get student input in the form of a graph (a circle) +#: This example shows how to get student input in the form of a graph (a line) #: by using interactive graphing tools. Load the parserGraphTool.pl macro for #: this. DOCUMENT(); -loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', - 'PGcourse.pl'); +loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #:% section = setup #: A cubic is created with 3 random zeros and a random y-intercept. @@ -31,36 +30,38 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', #: the correct answer. This is a string that contains a list of objects that #: the student will be expected to graph. Each object is a brace delimited list #: of the attributes of the object. The first attribute in each list is the -#: type of object to be graphed, `cubic` in this case. What the remaining -#: attributes are depend on the type. For a cubic the second attribute is -#: whether the object is to be `solid` or `dashed`, the remaining arguments -#: are the 4 points of the cubic. +#: type of object to be graphed, `line` in this case. What the remaining +#: attributes are depend on the type. For a line the second attribute is +#: whether the object is to be `solid` or `dashed`, and the remaining attibutes +#: are two distinct points on the line. #: #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * bbox: this is an array reference of four values xmin, ymax, xmax, ymin +#: * `bBox`: This is an array reference of four values xmin, ymax, xmax, ymin #: indicating the upper left and lower right corners of the visible graph. -# * availableTools: this determines which tools should be shown on the -#: graph tool. +#: * `availableTools`: This determines which tools will be available for the +#: student to use. #: #: There is a default checker for the GraphTool that will mark correct a -#: student answer that 'looks' like the correct one. For simple graphs, -#: the default should be sufficient. If not see -#: XXXX for an example with a custom answer checker. - -$x0 = non_zero_random(-6,6); -$y0 = non_zero_random(-6,6); -$line = nicestring([$y0,$x0],['x','y']); +#: student answer that 'looks' like the correct one. For simple graphs, +#: the default should be sufficient. See PROBLINK('GraphToolCustomChecker.pg') +#: for an example of how to use a custom checker. +$x0 = non_zero_random(-6, 6); +$y0 = non_zero_random(-6, 6); +$line = nicestring([ $y0, $x0 ], [ 'x', 'y' ]); $gt = GraphTool("{line, solid, ($x0, 0), (0, $y0)}")->with( - bBox => [ -11, 11, 11, -11 ], - availableTools => - [ 'PointTool', 'LineTool', 'CircleTool', 'QuadraticTool', 'CubicTool', 'FillTool', 'SolidDashTool' ], + bBox => [ -11, 11, 11, -11 ], + availableTools => [ + 'PointTool', 'LineTool', + 'CircleTool', 'QuadraticTool', + 'CubicTool', 'FillTool', + 'SolidDashTool' + ], ); - #:% section = statement. #: The code `[_]{$gt}` inserts the GraphTool. BEGIN_PGML @@ -88,5 +89,4 @@ and thus the [`x`]-intercept is number in the fraction under the [`x`] or END_PGML_SOLUTION - -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/doc/sample-problems/Algebra/GraphToolNumberLine.pg b/doc/sample-problems/Algebra/GraphToolNumberLine.pg index 435f529f55..0306c52dcb 100644 --- a/doc/sample-problems/Algebra/GraphToolNumberLine.pg +++ b/doc/sample-problems/Algebra/GraphToolNumberLine.pg @@ -16,61 +16,58 @@ #:% categories = [graph] #:% section = preamble -#: This example shows how to get student input in the form of a graph (a circle) +#: This example shows how to get student input in the form of a graph #: by using interactive graphing tools. Load the `parserGraphTool.pl` macro for #: this. DOCUMENT(); -loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', - 'PGcourse.pl'); - +loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #:% section = setup -#: There are two different intervals created with random enpoints. The first -#: one is finite, the second an infinite interval. +#: Two intervals are created with random enpoints. The first +#: one is a bounded interval, and the second an unbounded interval. #: #: The `GraphTool` method creates the graph tool object. The only argument is #: the correct answer. This is a string that contains a list of objects that #: the student will be expected to graph. Each object is a brace delimited list #: of the attributes of the object. The first attribute in each list is the -#: type of object to be graphed, `interval` in this case. What the remaining -#: attributes are depend on the type and for this case, enter the interval -#: in standard interval notation. +#: type of object to be graphed, `interval` in this case. The remaining +#: attributes depend on the type of graph object. For an `interval`, there is +#: only one attribute which is the interval in standard interval notation. #: #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * numberLine is set to 1 (true) to indicate this is a one-dimensional +#: * `numberLine` is set to 1 (true) to indicate this is a one-dimensional #: graph. -#: * bbox: since we are using an number the bounding box is just an array -#: reference [xmin, xmax] -# * availableTools: this determines which tools should be shown on the -#: graph tool. -#: ticksDistanceX: indicates the distance between tick marks in the x direction -#: minorTicksX: indicates the distance of subticks. The value 0 means no -#: subticks. -#: * useBracketEnds: 1 (true) means to use () and [] to denote the intervals +#: * `bBox`: For a number line the bounding box is an array reference [xmin, xmax] +#: containing the left and right limits of the visible graph. +#: * `availableTools`: This determines which tools will be available for the +#: student to use. +#: * `ticksDistanceX`: The distance between tick marks in the x direction. +#: * `minorTicksX`: The number of minor ticks to show. This can be 0. +#: * `useBracketEnds`: 1 (true) means to use () and [] to denote the intervals #: a value of 0 means to use open and solid circles. $x1 = random(1, 5); -$gt1 = GraphTool("{interval,(-$x1,$x1]}")->with( - availableTools => [ 'PointTool', 'IntervalTool', 'IncludeExcludePointTool' ], - numberLine => 1, - bBox => [ -6, 6 ], - ticksDistanceX => 1, - minorTicksX => 0, - useBracketEnds => 1 +$gt1 = GraphTool("{interval, (-$x1,$x1]}")->with( + availableTools => [ 'PointTool', 'IntervalTool', 'IncludeExcludePointTool' ], + numberLine => 1, + bBox => [ -6, 6 ], + ticksDistanceX => 1, + minorTicksX => 0, + useBracketEnds => 1 ); -$x2 = random(-5,5); +$x2 = random(-5, 5); -$gt2 = GraphTool("{interval,(-inf,$x2)}")->with( - availableTools => [ 'PointTool', 'IntervalTool', 'IncludeExcludePointTool' ], - numberLine => 1, - bBox => [ -6, 6 ], - ticksDistanceX => 1, - minorTicksX => 0, - useBracketEnds => 0 +$gt2 = GraphTool("{interval, (-inf,$x2)}")->with( + availableTools => [ 'PointTool', 'IntervalTool', 'IncludeExcludePointTool' ], + numberLine => 1, + bBox => [ -6, 6 ], + ticksDistanceX => 1, + minorTicksX => 0, + useBracketEnds => 0 ); #:% section = statement. @@ -85,5 +82,4 @@ Graph the solution set for the linear inequality [`x < [$x2]`]. [_]{$gt2} END_PGML - -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/doc/sample-problems/Algebra/GraphToolPoints.pg b/doc/sample-problems/Algebra/GraphToolPoints.pg index bc320d5e5b..540c6583dd 100644 --- a/doc/sample-problems/Algebra/GraphToolPoints.pg +++ b/doc/sample-problems/Algebra/GraphToolPoints.pg @@ -1,5 +1,5 @@ ## DESCRIPTION -## Interactive graphing tool problem that asks the student to plot a circle. +## Interactive graphing tool problem that asks the student to plot points. ## ENDDESCRIPTION ## DBsubject(WeBWorK) @@ -22,8 +22,7 @@ #: this. DOCUMENT(); -loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', - 'PGcourse.pl'); +loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl'); #:% section = setup #: Two points are created at random. @@ -33,18 +32,18 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', #: the student will be expected to graph. Each object is a brace delimited list #: of the attributes of the object. The first attribute in each list is the #: type of object to be graphed, `point` in this case. What the remaining -#: attributes are depend on the type. For a point, it is just the coordinates -#: in standard form. +#: attributes are depend on the type. For a point, there is only one additional +#: attribute which is the point itself. #: #: The `->with` method is then used to set options for the `GraphTool` object. #: In this case the options that are set are: #: -#: * `bbox`: this is an array reference of four values `xmin, ymax, xmax, ymin` +#: * `bBox`: This is an array reference of four values `xmin, ymax, xmax, ymin` #: indicating the upper left and lower right corners of the visible graph. -#: * `availableTools`: this determines which tools should be shown on the -#: graph tool. -#: * `showCoordinatesHints`: the 0 turns off coordinate hints, which would show -#: students the coordinates the cursor is on. +#: * `availableTools`: This determines which tools will be available for the +#: student to use. +#: * `showCoordinateHints`: Setting this to 0 turns off coordinate hints, which +#: would show students the coordinates the cursor is over. #: #: For more details, see the PODLINK('POD documentation','parserGraphTool.pl') $x1 = non_zero_random(-5, 5); @@ -54,9 +53,9 @@ $x2 = non_zero_random(-5, 5); $y2 = non_zero_random(-5, 5); $gt = GraphTool("{point, ($x1, $y1)}", "{point, ($x2, $y2)}")->with( - availableTools => ['PointTool'], - bBox => [ -11, 11, 11, -11 ], - showCoordinateHints => 0, + availableTools => ['PointTool'], + bBox => [ -11, 11, 11, -11 ], + showCoordinateHints => 0, ); #:% section = statement. @@ -73,4 +72,4 @@ BEGIN_PGML_SOLUTION END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/doc/sample-problems/macro_pod.yaml b/doc/sample-problems/macro_pod.yaml index f2de770a89..ea71e94a56 100644 --- a/doc/sample-problems/macro_pod.yaml +++ b/doc/sample-problems/macro_pod.yaml @@ -26,11 +26,11 @@ macros: niceTables.pl: ui/niceTables.html parserAssignment.pl: parsers/parserAssignment.html + parserAutoStrings.pl: parser/parserAutoStrings.pl parserCheckboxList.pl: parsers/parserCheckboxList.html parserDifferenceQuotient.pl: parsers/parserDifferenceQuotient.html parserFormulaUpToConstant.pl: parsers/parserFormulaUpToConstant.html parserFormulaWithUnits.pl: parsers/parserFormulaWithUnits.html - parserFormulaUpToConstant.pl: parsers/parserFormulaUpToConstant.html parserFunction.pl: parsers/parserFunction.html parserGraphTool.pl: graph/parserGraphTool.html parserImplicitEquation.pl: parsers/parserImplicitEquation.html diff --git a/doc/templates/general-layout.mt b/doc/templates/general-layout.mt index 6cff55556a..7ec9791575 100644 --- a/doc/templates/general-layout.mt +++ b/doc/templates/general-layout.mt @@ -14,11 +14,11 @@ margin-top: 70px; } #sidebar { - --bs-offcanvas-width: 300px; + --bs-offcanvas-width: 320px; } @media only screen and (min-width: 768px) { #sidebar { - width: 275px; + width: 320px; height: calc(100vh - 70px); } } @@ -35,7 +35,8 @@ data-bs-toggle="dropdown" aria-expanded="false"> <%= $active eq 'categories' ? 'Sample Problems' : $active eq 'techniques' ? 'Problem Techniques' - : 'Subject Area Problems' =%> + : $active eq 'subjects' ? 'Subject Area Problems' + : 'Problems by Macro' =%>