Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/tex/pg.sty
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\input{PGML.tex}

% The macro alternatives for < should be used in math in PG problems to help
% avoid issus with a bare < in HMTL or XML output. The alternatives for > are
% avoid issues with a bare < in HTML or XML output. The alternatives for > are
% provided for parity.
\newcommand{\lt}{<}
\newcommand{\gt}{>}
Expand All @@ -36,7 +36,7 @@
% semantic macro definitions used by PG
\newcommand{\answerRule}[2][]{\raisebox{-3pt}{\parbox[t]{#2ex}{\hrulefill}}}

% height of a strut, used for example to possition the top border of an inline image
% height of a strut, used for example to position the top border of an inline image
% unit is initialized here, but value is set locally where needed
\newlength{\strutheight}

2 changes: 1 addition & 1 deletion bin/parse-problem-doc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ($filename, %global)
return;
}

# Ouput index files.
# Output index files.
for (qw(categories subjects macros techniques)) {
my $options = {
metadata => $index_table,
Expand Down
4 changes: 2 additions & 2 deletions bin/run-perltidy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ =head1 OPTIONS
# Validate options that were passed.
my %options;
my $err = Perl::Tidy::perltidy(argv => \@args, dump_options => \%options);
exit $err if $err;
die "The -pro option is not suppored by this script.\n" if defined $options{profile};
exit $err if $err;
die "The -pro option is not supported by this script.\n" if defined $options{profile};

unshift(@args, '-bext=/') unless defined $options{'backup-file-extension'};

Expand Down
2 changes: 1 addition & 1 deletion bin/update-localization-files
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ -z "$PG_ROOT" ]; then
fi

command -v xgettext.pl >/dev/null 2>&1 || {
echo >&2 "xgettext.pl needs to be installed. It is inlcuded in the perl package Locale::Maketext::Extract. Aborting.";
echo >&2 "xgettext.pl needs to be installed. It is included in the perl package Locale::Maketext::Extract. Aborting.";
exit 1;
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/AppletSupport/ww_applet_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ww_applet {
// Communication with the applet is in plain text, not in base64 code.

if (state) {
if (this.debug) console.log(`${this.appletName}: Obtain state from calling paramater`);
if (this.debug) console.log(`${this.appletName}: Obtain state from calling parameter`);
} else {
if (this.debug) console.log(`${this.appletName}: Obtain state from ${this.stateInput}`);
// Hidden answer box preserving applet state
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ sub push { push(@{ (shift)->{stack} }, @_) }
sub state { (shift)->top->{type} }

#
# Report an error at a given possition (if possible)
# Report an error at a given position (if possible)
#
sub Error {
my $self = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/Value/AnswerChecker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ sub cmp_compare {
}

#
# Check for wrong enpoints and wrong type of endpoints
# Check for wrong endpoints and wrong type of endpoints
#
sub cmp_postprocess {
my $self = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/PG/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use warnings;

# ImageGenerator

# Arguments to pass to dvipng. This is dependant on the version of dvipng.
# Arguments to pass to dvipng. This is dependent on the version of dvipng.
#
# For dvipng versions 0.x
# $ImageGenerator::DvipngArgs = "-x4000.5 -bgTransparent -Q6 -mode toshiba -D180";
Expand Down
4 changes: 2 additions & 2 deletions macros/core/PGbasicmacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ =head2 Answer blank macros:
When entering radio buttons using the "NAMED" format, you should use
NAMED_ANS_RADIO button for the first button and then use
NAMED_ANS_RADIO_EXTENSION for the remaining buttons. NAMED_ANS_RADIO requires a
matching answer evalutor, while NAMED_ANS_RADIO_EXTENSION does not. The name
matching answer evaluator, while NAMED_ANS_RADIO_EXTENSION does not. The name
used for NAMED_ANS_RADIO_EXTENSION should match the name used for
NAMED_ANS_RADIO (and the associated answer evaluator).

Expand Down Expand Up @@ -3228,7 +3228,7 @@ sub tag {
' ',
map {
($_ =~ s/_/-/gr) . (defined $attributes{$_} ? ('="' . encode_pg_and_html($attributes{$_})) . '"' : '')
}
}
keys %attributes
);

Expand Down
2 changes: 1 addition & 1 deletion macros/misc/randomPerson.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ =head2 Usage

Depending on the he/she/they pronoun, the methods C<they>, C<them>, C<their> and
C<theirs> (with or without capitalization) will select the correct subject, object,
possession, possesive forms of the pronoun. Also, note that C<go> is one of a
possession, possessive forms of the pronoun. Also, note that C<go> is one of a
few special verbs with irregular conjugation.

If you would like multiple people to be randomly choosen with unique names, use
Expand Down
4 changes: 2 additions & 2 deletions t/macros/numerical_methods.t
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ subtest 'Quadrature' => sub {

is trapezoid($f, 0, 2, steps => 4), 2.75, 'Trapezoid rule of x^2 on [0,2]';

is romberg($f, 0, 2), 8 / 3, 'Romberg interation for x^2 on [0,2]';
is romberg($g, 0, 1), exp(1) - 1, 'Romberg interation on e^x on [0,1]';
is romberg($f, 0, 2), 8 / 3, 'Romberg integration for x^2 on [0,2]';
is romberg($g, 0, 1), exp(1) - 1, 'Romberg integration on e^x on [0,1]';

is inv_romberg($g, 0, exp(1) - 1), 1.0, 'Inverse Romberg to find b with int of e^x on [0,b] returns 1';
};
Expand Down
4 changes: 2 additions & 2 deletions t/math_objects/matrix.t
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ subtest 'Test if Matrix is in (R)REF' => sub {
subtest 'Transpose a Matrix' => sub {
my $A = Matrix([ [ 1, 2, 3, 4 ], [ 5, 6, 7, 8 ], [ 9, 10, 11, 12 ] ]);
my $B = Matrix([ [ 1, 5, 9 ], [ 2, 6, 10 ], [ 3, 7, 11 ], [ 4, 8, 12 ] ]);
is $A->transpose->TeX, $B->TeX, 'Test the tranpose of a matrix';
is $A->transpose->TeX, $B->TeX, 'Test the transpose of a matrix';

my $row = Matrix([ 1, 2, 3, 4 ]);
my $row_trans = Matrix([ [1], [2], [3], [4] ]);
is $row->transpose->TeX, $row_trans->TeX, 'Transpose of a degree 1 Matrix';

my $C = Matrix([ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ]);
my $D = Matrix([ [ [ 1, 3 ], [ 2, 4 ] ], [ [ 5, 7 ], [ 6, 8 ] ] ]);
is $C->transpose->TeX, $D->TeX, 'Test the tranpose of a degree 3 tensor';
is $C->transpose->TeX, $D->TeX, 'Test the transpose of a degree 3 tensor';
};

subtest 'Extract an element' => sub {
Expand Down
2 changes: 1 addition & 1 deletion t/units/electron_volts.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ is \%tev, by_factor(10**12, \%electron_volt), 'tera is factor 10^1
done_testing();

# this sub is useful when reusing units for testing
# NumberWithUnits is mutable and test order dependant
# NumberWithUnits is mutable and test order dependent
sub by_factor {
my ($value, $unit) = @_;
my $new_unit = {%$unit}; # shallow copy hash values
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolNumberLine.pg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: Two intervals are created with random enpoints. The first
#: Two intervals are created with random endpoints. 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
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Geometry/LineSegmentGraphTool.pg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
#: `($sx1, $sy1)` and `($sx2, $sy2)`. For a correct answer, the line segment
#: must have the given the endpoints and be solid.
#:
#: Mulitple line segments can be added to the graph tool, however, if a
#: Multiple line segments can be added to the graph tool, however, if a
#: triangle or quadrilateral is desired, see PROBLINK('TriangleGraphTool.pg')
#: and PROBLINK('QuadrilateralGraphTool.pg') for more appropriate tools.
$sx1 = random(-8, 8);
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/IntegralCalc/GraphShadingPlot.pg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'plots.pl', 'PGcourse.pl');
#:
#: First create a `Plot` object with a plotting window that will capture the
#: transformed function. The function is then added to the plot with fill
#: characteristics. Note: it is important that the `name` atrribute is defined.
#: characteristics. Note: it is important that the `name` attribute is defined.

$a = random(-4, 2);
$b = random( 1, 4);
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Misc/RandomPerson.pg
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $c = random(4, 8, 2);
#: capitalized pronouns.
#:
#: Alternatively, a more-natural set of methods, `they, them, their` and `theirs`
#: will generate the correct subject, object, possession, possesive forms of the
#: will generate the correct subject, object, possession, possessive forms of the
#: pronoun.
#:
#: In addition, there is a `verb` method to conjugate most
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Parametric/SpaceCurveGraph.pg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'plotly3D.pl', 'PGcourse.pl');

#:% section = setup
#: A `plotly3D` graph is created with the `Graph3D` function. There are many
#: options as decribed in PODLINK('plotly3D macro documentation','plotly3D.pl').
#: options as described in PODLINK('plotly3D macro documentation','plotly3D.pl').
#: In this example, only the `height`, `width`, and `title` are provided.
#:
#: A parametric curve is added to the graph with the `addCurve` method, which
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Parametric/SurfaceGraph.pg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'plotly3D.pl', 'PGcourse.pl');

#:% section = setup
#: A `plotly3D` graph is created with the `Graph3D` function. There are many
#: options as decribed in PODLINK('plotly3D macro documentation','plotly3D.pl').
#: options as described in PODLINK('plotly3D macro documentation','plotly3D.pl').
#: In this example, only the `height`, `width`, and `title` are provided.
#:
#: A parametric surface is added to the graph with the `addSurface` method,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');

#:% section = setup
#: Several context flags are set for this problem. The meaning of these flags
#: are decribed in the following list.
#: are described in the following list.
#:
#: * The flag `tolType => 'digits'` switches from the default `'relative'`
#: tolerance type to the `'digits'` tolerance type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
#: `sgn`
#: * `Vector`: disables `norm`, `unit`
#: * `Complex`: disables `arg`, `mod`, `Re`, `Im`, `conj`
#: * `All`: diables all predefined functions
#: * `All`: disables all predefined functions
#:
#: Alternatively, the following syntax can be used.
#:
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/ProblemTechniques/Images.pg
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $gt = GraphTool('{circle, solid, (1, 1), (2, 2)}');
#: graphs. It is intended to be used to show an interactive graphing tool in
#: which student's are expected to graph requested objects, in this case the
#: circle that has center `(1, 1)` and passes through the point `(2, 2)`.
#: However, static images can be diplayed as is shown in this example. The
#: However, static images can be displayed as is shown in this example. The
#: intent for this usage is to show the correct graph in a solution.
BEGIN_PGML
* A static image: [!Graph of an exponential!]{'image.png'}{120}
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Here's an example:
#:% categories = [graph]
```

## Structure of the code documenation
## Structure of the code documentation

The comments that are associated with each file in on the WeBWorK
wiki have been embedded as formatted
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Statistics/ScatterPlot.pg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ loadMacros(
#: components.
#:
#: For the plot, first set up the `Plot` with a plotting window that will
#: caputure the data. The `add_dataset` method adds the data to the plot
#: capture the data. The `add_dataset` method adds the data to the plot
#: with circles and color blue.
#:
#: The line is added to the dataset with the `add_function` method. The 3rd
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/VectorCalc/VectorLineSegment1.pg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## DESCRIPTION
## A Vector-value parametric line segment with a general paramterization
## A Vector-value parametric line segment with a general parameterization
## ENDDESCRIPTION

## DBsubject(WeBWorK)
Expand Down