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
2 changes: 1 addition & 1 deletion bin/perltidy-pg.pl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ =head1 OPTIONS
Note that if the -pro=file option is not given, then this script will attempt to
use the perltidy-pg.rc file in the PG bin directory for this option. For this to
work the the perltidy-pg.rc file in the PG bin directory must be readable.
work the perltidy-pg.rc file in the PG bin directory must be readable.
=cut

Expand Down
2 changes: 1 addition & 1 deletion bin/pg-critic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

=head1 NAME
pg-critic.pl - Command line interface to critque PG problem code.
pg-critic.pl - Command line interface to critique PG problem code.
=head1 SYNOPSIS
Expand Down
4 changes: 2 additions & 2 deletions bin/run-perltidy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ =head1 DESCRIPTION
=head1 OPTIONS
For this script to work the the .perltidyrc file in the pg root directory
must be readable. Note that the pg root directory is automatically detected.
For this script to work the .perltidyrc file in the pg root directory must be
readable. Note that the pg root directory is automatically detected.
This script accepts all of the options that are accepted by perltidy. See the
perltidy documentation for details.
Expand Down
2 changes: 1 addition & 1 deletion bin/update-localization-files
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function print_help_exit
printf " Update the pg.pot and language .po files with translation strings from the code.\n" >&2
printf " options:\n" >&2
printf " -p|--po-update Update po files as well. By default only the pg.pot file is updated.\n" >&2
printf " -l|--langauge Update the only given language in addition to updating the pg.pot file.\n" >&2
printf " -l|--language Update the only given language in addition to updating the pg.pot file.\n" >&2
printf " -h|--help Show this help.\n" >&2
exit 1
}
Expand Down
4 changes: 2 additions & 2 deletions conf/pg_config.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ directories:
OPL: /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary
Contrib: /opt/webwork/libraries/webwork-open-problem-library/Contrib

# The root PG location. This will be set from the PG_ROOT environment variable, but can be overriden here.
# The root PG location. This will be set from the PG_ROOT environment variable, but can be overridden here.
root: $pg_root

# Global temporary directory. This location must be writable.
Expand Down Expand Up @@ -209,7 +209,7 @@ displayModeOptions:
# PG modules to load
# The first item of each list is the module file to load. The remaining items are additional packages to import that are
# also contained in that file.
# That is, if you wish to include a file MyModule.pm which containes the package MyModule and the additional packages
# That is, if you wish to include a file MyModule.pm which contains the package MyModule and the additional packages
# Dependency1 and Dependency2, then these should appear as [Mymodule, Dependency1, Dependency2].
modules:
- [Encode]
Expand Down
2 changes: 1 addition & 1 deletion doc/Artistic
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ products derived from this software without specific prior written permission.

10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

The End
8 changes: 4 additions & 4 deletions doc/MathObjectsAnswerCheckers.pod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use a single object to produce numeric values, TeX output, and answer
strings from a single formula entry. This avoids having to type a
function three different ways (which makes maintaining a problem much
harder). Since MathObjects also includes vector and complex
arthimetic, it is easier to work with these types of values as well.
arithmetic, it is easier to work with these types of values as well.

Secondly using MathObjects improves the processing of student input.
This is accomplished through special answer checkers that are part of
Expand Down Expand Up @@ -670,7 +670,7 @@ student and correct answers to determine if the student list matches
the correct list (regardless of order).

When the C<checker> is called from the list checker, it has two
additional paramters:
additional parameters:

checker => sub {
my ($correct,$student,$ansHash,$nth,$value) = @_;
Expand Down Expand Up @@ -725,7 +725,7 @@ Note that in a C<list_checker> for a List object, you will have to do
type checking yourself to check if the types of the entries are
correct, since a list can consist of any type of elements.

The C<list_checker> should return an array consisting of the nuber of
The C<list_checker> should return an array consisting of the number of
student entries that are correct followed by any error messages that
should be displayed (each on a separate line in the messages section).

Expand Down Expand Up @@ -827,7 +827,7 @@ C<$n>$ when the answer is correct.
More error checking might be desired, here. For example, since a
Union can be of Intervals or Sets, we might want to check that all the
student's entries in the Union are actually intervals (the current
version allows Sets). Note thta because the
version allows Sets). Note that because the
C<studentsMustReduceUnions> parameter is 1 by default, we don't have
to check for disjoint intervals. On the other hand, that flag also
requires intervals to be merged into one if they could be, e.g.,
Expand Down
10 changes: 5 additions & 5 deletions doc/UsingMathObjects.pod
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ name to S<C<< perlFunction >>> to get a named function to call:
Formula('x^2 + 3')->perlFunction('f');
$y = f(5);

If the formula involves more than one variable, then the paramaters
If the formula involves more than one variable, then the parameters
should be given in alphabetical order.

Formula('x^2 + y')->perlFunction('f');
Expand Down Expand Up @@ -193,7 +193,7 @@ automatically, when necessary.

=item * vectors

A vetor is represented C<< <a,b,c> >> or C<a i + b j + c k> (when used
A vector is represented C<< <a,b,c> >> or C<a i + b j + c k> (when used
in vector context). As with points, vectors can have any number of
coordinates. For example, C<< <1,0,0> >>, C<< <-1,3> >>, C<< <x,1-x> >>,
etc.
Expand Down Expand Up @@ -341,7 +341,7 @@ so you can use:
to produce a TeX version of the vector, just as you can with formulas.

There are several "constant" functions that generate common constant
values. These include C<pi>, C<i>, C<j>, C<k> and C<Infininty>. you
values. These include C<pi>, C<i>, C<j>, C<k> and C<Infinity>. you
can use these in perl expressions as though they were their actual
values:

Expand All @@ -368,7 +368,7 @@ interpretation is used, you specify a parser I<context>.

The context controls what operations and functions are defined in the
parser, what variables and constants to allow, how to interpret
various paretheses, and so on. Changing the context can completely
various parentheses, and so on. Changing the context can completely
change the way a formula is interpreted.

There are several predefined contexts: S<C<< Numeric >>>, S<C<<
Expand Down Expand Up @@ -435,7 +435,7 @@ used for variables above. The command

$M = $constant->constants->get('M');

will return the value of the consant C<M>. (See the
will return the value of the constant C<M>. (See the
F<pg/lib/Value/Context/Data.pm> file for more information on the methods
you can call for the various types of context data.)

Expand Down
4 changes: 2 additions & 2 deletions lib/AnswerHash.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ The entry $rh_ans->{error_flag} is set to "FLAG".
The catch_error and clear_error methods use this entry.
message is a descriptive message for the end user, defining what error occured.
message is a descriptive message for the end user, defining what error occurred.
=head3 catch_error
Expand Down Expand Up @@ -597,7 +597,7 @@ sub evaluate {
eval(q!main::DEBUG_MESSAGE( `<h4>final result: </h4>`, pretty_print($rh_ans,'html'))!)
if defined($self->{debug})
and $self->{debug} > 0;
# re-refrence $rh_ans;
# re-reference $rh_ans;
$self->{rh_ans} = $rh_ans;
$rh_ans;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/AnswerIO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use strict;
sub saveAnswerToFile {
my $logFileID = shift;
my $string = shift;
# We want to allow acces only to predetermined files
# We want to allow access only to predetermined files
# We accomplish this by translating legal IDs into a file name

my $rh_allowableFiles = {
Expand Down
2 changes: 1 addition & 1 deletion lib/Applet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ The applets initialization method is as follows:
=head3 Submit sequence
When the WW question submit button is pressed the form containing the WW question calles the
When the WW question submit button is pressed the form containing the WW question calls the
JavaScript "submitAction()" which then asks each of the applets on the page to perform its
submit action which consists of
Expand Down
10 changes: 5 additions & 5 deletions lib/ChoiceList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ sub cmp {
return @answers;
}

#Match and Select return references to arrays while Multiple justs returns a string
#Match and Select return references to arrays while Multiple just returns a string
#so Match and Select use ra_correct_ans while Multiple uses correct_ans
sub correct_ans {
warn "Match and/or Select do not use correct_ans.\nYou should use ra_correct_ans instead.";
Expand Down Expand Up @@ -419,7 +419,7 @@ sub getRandoms {
my @remaining = complement([ 0 .. $N - 1 ], [@fixed_choices]);

my @slice = @fixed_choices;
push(@slice, @remaining[ $self->NchooseK(scalar(@remaining), $K) ]); #slice of remaing choices
push(@slice, @remaining[ $self->NchooseK(scalar(@remaining), $K) ]); #slice of remaining choices
@slice = @slice[ $self->NchooseK(scalar(@slice), scalar(@slice)) ]; #randomize the slice (the questions)

#shuffle will be used to randomize the answers a second time (so they don't coincide with the questions)
Expand Down Expand Up @@ -454,8 +454,8 @@ sub makeLast {

push(@{ $self->{selected_a} }, @input);
$self->condense(); #make sure that the user has not accidentally forced a duplicate answer
#note: condense was changed to eliminate the first occurence of a duplicate
#instead of the last occurence so that it could be used in this case and
#note: condense was changed to eliminate the first occurrence of a duplicate
#instead of the last occurrence so that it could be used in this case and
#would not negate the fact that one of the answers needs to be at the end
}

Expand Down Expand Up @@ -526,7 +526,7 @@ sub condense {
}

#because we just changed the element that $outer points to
#we need to run throught the loop to make sure that the new value at $outer has
#we need to run through the loop to make sure that the new value at $outer has
#no duplicates as well
#This means that we don't want to increment either counter (and we need to reset $inner)
$repeat = 1;
Expand Down
2 changes: 1 addition & 1 deletion lib/Chromatic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ sub matrix_graph {
return @matrix;
}

# $graph input is a string adjacency matrix with rows terminted with semicolons
# $graph input is a string adjacency matrix with rows terminated with semicolons
# and entries of each row separated by a space.
sub ChromNum {
my $graph = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/Complex1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ sub cplx {
my ($re, $im) = @_;
return $package->make(defined $re ? $re : 0, defined $im ? $im : 0);
}
# cplx adn cplxe changed by MEG
# cplx and cplxe changed by MEG
#
# cplxe
#
Expand Down
6 changes: 3 additions & 3 deletions lib/Distributions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ Statistics::Distributions - Perl module for calculating probabilities and critic
=head1 DESCRIPTION
This Perl module calulates percentage points (6 significant digits) of the u (standard normal) distribution,
the student's t distribution, the chi-square distribution and the F distribution.
This Perl module calculates percentage points (6 significant digits) of the u (standard normal) distribution,
the student's t distribution, the chi-square distribution and the F distribution.
It can also calculate the upper probability (6 significant digits) of the u (standard normal),
the chi-square, the t and the F distribution.
Expand All @@ -567,7 +567,7 @@ If you are interested in more precise algorithms you could look at:
=head1 AUTHOR
Michael Kospach, mike.perl@gmx.at
Nice formating, simplification and bug repair by Matthias Trautner Kromann, mtk@id.cbs.dk
Nice formatting, simplification and bug repair by Matthias Trautner Kromann, mtk@id.cbs.dk
=cut
Expand Down
8 changes: 4 additions & 4 deletions lib/Fraction.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Fraction object
# Keeps track of two variables- numerator and denominator.
# Has subroutines for basic arithmatic functions, for anything
# Has subroutines for basic arithmetic functions, for anything
# more complicated, it can return a scalar value of
# numerator/denominator.
# VS 7/20/2000
Expand Down Expand Up @@ -44,7 +44,7 @@ Other methods
=head1 SYNOPSIS
The fraction object stores two variables, numerator and denominator. The basic
arithmatic methods listed above can be performed on a fraction, and it can return its own
arithmetic methods listed above can be performed on a fraction, and it can return its own
scalar value for use with functions expecting a scalar (ie, sqrt($frac->scalar) ).
=cut
Expand Down Expand Up @@ -387,7 +387,7 @@ sub print_inline {
# Internal Methods

# Least Common Multiple
# Used in arithmatic methods to convert two fractions to common denominator
# Used in arithmetic methods to convert two fractions to common denominator
# takes in two scalar values and returns their lcm
sub lcm {
my $self = shift;
Expand Down Expand Up @@ -418,7 +418,7 @@ sub lcm {
sub gcd {

my $self = shift;
my $a = abs(shift); #absolute values because this will yeild the same gcd,
my $a = abs(shift); #absolute values because this will yield the same gcd,
my $b = abs(shift); #but allows use of the mod operation

if ($a < $b) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Fun.pm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ domain of the function object is set to the domain of the graph.
=item $fn = new Fun ( x_rule_ref, y_rule_ref );
A parametric function object is created where the subroutines refered to by x_rule_ref and y_rule_ref define
A parametric function object is created where the subroutines referred to by x_rule_ref and y_rule_ref define
the x and y outputs in terms of the input t.
=item $fn = new Fun ( x_rule_ref, y_rule_ref, graph_ref );
Expand All @@ -87,7 +87,7 @@ of the function object is not adjusted. The domain's default value is (-1, 1).
=back
=head2 Properites
=head2 Properties
All of the properties are set using the construction $new_value = $fn->property($new_value)
and read using $current_value = $fn->property()
Expand Down
4 changes: 2 additions & 2 deletions lib/Label.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This module defines labels for the graph objects (WWPlot).
$label1 = new Label($x_value, $y_value, $label_string, $label_color, @options)
$options is an array with (*'d defaults)
- one of 'left'*, 'center', 'right' (horizontal alignment)
- one of 'bottom', 'center', 'top'* (verical alignment)
- one of 'bottom', 'center', 'top'* (vertical alignment)
- one of 'horizontal'*, 'vertical' (orientation)
- one of 'small', 'large', 'mediumbold'*, 'tiny', 'giant' (which gd font to use)
Note the alignment specifications are relative to the English reading of the string,
Expand Down Expand Up @@ -87,7 +87,7 @@ sub _initialize {
elsif ($j eq 'center') { $self->lr_nudge(-(length($self->str)) / 2); }
elsif ($j eq 'middle') { $self->tb_nudge(-0.5); }
elsif ($j eq 'vertical') { $self->orientation($j); }
#there are only five avialble fonts: http://search.cpan.org/~rurban/GD-2.68/lib/GD.pm#Font_Utilities
#there are only five available fonts: http://search.cpan.org/~rurban/GD-2.68/lib/GD.pm#Font_Utilities
elsif ($j eq 'small') { $self->font(GD::gdSmallFont); }
elsif ($j eq 'large') { $self->font(GD::gdLargeFont); }
elsif ($j eq 'tiny') { $self->font(GD::gdTinyFont); }
Expand Down
12 changes: 6 additions & 6 deletions lib/List.pm
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ sub cmp {
return @answers;
}

#Match and Select return references to arrays while Multiple justs returns a string
#Match and Select return references to arrays while Multiple just returns a string
#so Match and Select use ra_correct_ans while Multiple uses correct_ans
sub correct_ans {
warn "Match and/or Select do not use correct_ans.\nYou should use ra_correct_ans instead.";
Expand Down Expand Up @@ -419,7 +419,7 @@ sub getRandoms {
my @remaining = complement([ 0 .. $N - 1 ], [@fixed_choices]);

my @slice = @fixed_choices;
push(@slice, @remaining[ $self->NchooseK(scalar(@remaining), $K) ]); #slice of remaing choices
push(@slice, @remaining[ $self->NchooseK(scalar(@remaining), $K) ]); #slice of remaining choices
@slice = @slice[ $self->NchooseK(scalar(@slice), scalar(@slice)) ]; #randomize the slice (the questions)

#shuffle will be used to randomize the answers a second time (so they don't coincide with the questions)
Expand Down Expand Up @@ -454,8 +454,8 @@ sub makeLast {

push(@{ $self->{selected_a} }, @input);
$self->condense(); #make sure that the user has not accidentally forced a duplicate answer
#note: condense was changed to eliminate the first occurence of a duplicate
#instead of the last occurence so that it could be used in this case and
#note: condense was changed to eliminate the first occurrence of a duplicate
#instead of the last occurrence so that it could be used in this case and
#would not negate the fact that one of the answers needs to be at the end
}

Expand Down Expand Up @@ -529,7 +529,7 @@ sub condense {
}

#because we just changed the element that $outer points to
#we need to run throught the loop to make sure that the new value at $outer has
#we need to run through the loop to make sure that the new value at $outer has
#no duplicates as well
#This means that we don't want to increment either counter (and we need to reset $inner)
$repeat = 1;
Expand Down Expand Up @@ -575,7 +575,7 @@ sub condense {
# my $out = '';
# if ( not ref($r_input) ) {
# $out = $r_input; # not a reference
# } elsif ("$r_input" =~/hash/i ) { # this will pick up objects whose '$self' is hash and so works better than ref($r_iput).
# } elsif ("$r_input" =~/hash/i ) { # this will pick up objects whose '$self' is hash and so works better than ref($r_input).
# local($^W) = 0;
# $out .= "$r_input " ."<TABLE border = \"2\" cellpadding = \"3\" BGCOLOR = \"#FFFFFF\">";
# foreach my $key (sort keys %$r_input ) {
Expand Down
Loading