Skip to content

Commit d24c023

Browse files
authored
Merge pull request #784 from openwebwork/WeBWorK-2.13
WeBWorK-2.13
2 parents 94b4a42 + c20363f commit d24c023

File tree

125 files changed

+116256
-18849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+116256
-18849
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Online Homework Delivery System
33
Version 2.*
44

5-
Copyright 2000-2016, The WeBWorK Project
5+
Copyright 2000-2017, The WeBWorK Project
66
All rights reserved.
77

88
This program is free software; you can redistribute it and/or modify

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Version 2.*
44
Branch: github.com/openwebwork
55

6-
http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.11
7-
Copyright 2000-2016, The WeBWorK Project
6+
http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.13
7+
Copyright 2000-2017, The WeBWorK Project
88
http://webwork.maa.org
99
All rights reserved.
1010

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$WW_VERSION = '2.12';
2-
$WW_COPYRIGHT_YEARS = '1996-2016';
1+
$WW_VERSION = 'WeBWorK-2.13';
2+
$WW_COPYRIGHT_YEARS = '1996-2017';
33

44
1;

bin/OPL-update

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ if($libraryVersion eq '2.5') {
159159
lastname varchar (255) NOT NULL,
160160
firstname varchar (255) NOT NULL,
161161
email varchar (255),
162-
KEY author (lastname, firstname),
162+
KEY author (lastname(100), firstname(100)),
163163
PRIMARY KEY (author_id)
164164
'],
165165
[$tables{path}, '
@@ -186,7 +186,7 @@ if($libraryVersion eq '2.5') {
186186
'],
187187
[$tables{keyword}, '
188188
keyword_id int(15) NOT NULL auto_increment,
189-
keyword varchar(255) NOT NULL,
189+
keyword varchar(256) NOT NULL,
190190
KEY (keyword),
191191
PRIMARY KEY (keyword_id)
192192
'],

bin/check_modules.pl

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
my @apache1ModulesList = qw(
2626
Apache
27-
Apache::Constants
27+
Apache::Constants
2828
Apache::Cookie
2929
Apache::Log
3030
Apache::Request
@@ -46,8 +46,9 @@
4646
Crypt::SSLeay
4747
Dancer
4848
Dancer::Plugin::Database
49+
Data::Dump
4950
Data::Dumper
50-
Data::UUID
51+
Data::UUID
5152
Date::Format
5253
Date::Parse
5354
DateTime
@@ -56,6 +57,9 @@
5657
Digest::MD5
5758
Digest::SHA
5859
Email::Address
60+
Email::Simple;
61+
Email::Sender::Simple
62+
Email::Sender::Transport::SMTP
5963
Errno
6064
Exception::Class
6165
File::Copy
@@ -73,18 +77,20 @@
7377
HTML::Tagset
7478
HTML::Template
7579
IO::File
80+
IO::Socket::SSL
7681
Iterator
7782
Iterator::Util
7883
JSON
7984
Locale::Maketext::Lexicon
8085
Locale::Maketext::Simple
81-
LWP::Protocol::https
86+
LWP::Protocol::https
8287
Mail::Sender
8388
MIME::Base64
8489
Net::IP
8590
Net::LDAPS
8691
Net::OAuth
8792
Net::SMTP
93+
Net::SSLeay
8894
Opcode
8995
PadWalker
9096
Path::Class
@@ -93,9 +99,10 @@
9399
Pod::WSDL
94100
Safe
95101
Scalar::Util
96-
SOAP::Lite
102+
SOAP::Lite
97103
Socket
98104
SQL::Abstract
105+
Statistics::R::IO
99106
String::ShellQuote
100107
Template
101108
Text::CSV
@@ -113,7 +120,9 @@
113120
);
114121

115122
my %moduleVersion = (
116-
'LWP::Protocol::https' => 6.06
123+
'LWP::Protocol::https' => 6.06,
124+
'Net::SSLeay' => 1.46,
125+
'IO::Socket::SSL' => 2.007
117126
);
118127

119128
# modules used by disabled code
@@ -146,7 +155,7 @@ sub check_apps {
146155
# print "\$PATH=", shift @PATH, "\n"; # this throws away the first item -- usually /bin
147156
print "\$PATH=";
148157
print join ("\n", map(" $_", @PATH)), "\n\n";
149-
158+
150159
foreach my $app (@applicationsList) {
151160
my $found = which($app);
152161
if ($found) {
@@ -166,14 +175,14 @@ sub which {
166175

167176
sub check_modules {
168177
my @modulesList = @_;
169-
178+
170179
print "\nChecking your \@INC for modules required by WeBWorK...\n";
171180
my @inc = @INC;
172181
print "\@INC=";
173182
print join ("\n", map(" $_", @inc)), "\n\n";
174-
183+
175184
no strict 'refs';
176-
185+
177186
foreach my $module (@modulesList) {
178187
eval "use $module";
179188
if ($@) {
@@ -186,9 +195,9 @@ sub check_modules {
186195
print "** $module found, but failed to load: $@";
187196
}
188197
} elsif (defined($moduleVersion{$module}) &&
189-
version->parse(${$module.'::VERSION'}) <
198+
version->parse(${$module.'::VERSION'}) <
190199
version->parse($moduleVersion{$module})) {
191-
print "** $module found, but not version $moduleVersion{$module} or better\n";
200+
print "** $module found, but not version $moduleVersion{$module} or better\n";
192201
} else {
193202
print " $module found and loaded\n";
194203
}

bin/update-OPL-statistics

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ my $global_sql_file = $ce->{problemLibrary}{root}.'/OPL_global_statistics.sql';
186186

187187
if (-e $global_sql_file) {
188188

189-
my ($dbi,$dbtype,$db,$host) = split(':',$ce->{database_dsn});
189+
my ($dbi,$dbtype,$db,$host,$port) = split(':',$ce->{database_dsn});
190190

191191
$host = 'localhost' unless $host;
192+
193+
$port = 3306 unless $port;
192194

193195
my $dbuser = $ce->{database_username};
194196
my $dbpass = $ce->{database_password};
@@ -204,8 +206,8 @@ EOS
204206
$db = shell_quote($db);
205207

206208
my $mysql_command = $ce->{externalPrograms}->{mysql};
207-
208-
`$mysql_command -h $host -u $dbuser -p$dbpass $db < $global_sql_file`;
209+
210+
`$mysql_command --host=$host --port=$port --user=$dbuser --password=$dbpass $db < $global_sql_file`;
209211

210212
}
211213

bin/update_localization_files

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
if [ -z "$WEBWORK_ROOT" ] || [ -z "$PG_ROOT" ]; then
4+
echo >&2 "You need to set both the WEBWORK_ROOT and PG_ROOT environment variables. Aborting."
5+
exit 1
6+
fi
7+
8+
command -v xgettext.pl >/dev/null 2>&1 || {
9+
echo >&2 "xgettext.pl needs to be installed. It is inlcuded in the perl package Locale::Maketext::Extract. Aborting.";
10+
exit 1;
11+
}
12+
13+
LOCDIR=$WEBWORK_ROOT/lib/WeBWorK/Localize
14+
15+
cd $LOCDIR
16+
17+
echo "Updating $WEBWORK_ROOT/webwork2.pot"
18+
19+
xgettext.pl -o webwork2.pot -D $WEBWORK_ROOT/lib -D $PG_ROOT/lib -D $PG_ROOT/macros
20+
21+
find $LOCDIR -name '*.po' -exec bash -c "echo \"Updating {}\"; msgmerge -qU {} webwork2.pot" \;

bin/upload-OPL-statistics

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ use String::ShellQuote;
3030
my $ce = new WeBWorK::CourseEnvironment({
3131
webwork_dir => $ENV{WEBWORK_ROOT},});
3232

33-
my ($dbi,$dbtype,$db,$host) = split(':',$ce->{database_dsn});
33+
my ($dbi,$dbtype,$db,$host,$port) = split(':',$ce->{database_dsn});
3434

3535
$host = 'localhost' unless $host;
3636

37+
$port = 3306 unless $port;
38+
3739
my $dbuser = $ce->{database_username};
3840
my $dbpass = $ce->{database_password};
3941

@@ -49,7 +51,7 @@ $db = shell_quote($db);
4951

5052
my $mysqldump_command = $ce->{externalPrograms}->{mysqldump};
5153

52-
`$mysqldump_command --host=$host --user=$dbuser --password=$dbpass $db OPL_local_statistics > $output_file`;
54+
`$mysqldump_command --host=$host --port=$port --user=$dbuser --password=$dbpass $db OPL_local_statistics > $output_file`;
5355

5456
print "Database File Created\n";
5557

conf/defaults.config

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ $webworkURLs{docs} = "http://webwork.maa.org";
295295
# URL of WeBWorK Bugzilla database.
296296
$webworkURLs{bugReporter} = "http://bugs.webwork.maa.org/enter_bug.cgi";
297297

298+
#URL for help buttons on the PGProblemEditor pages:
299+
$webworkURLs{problemTechniquesHelpURL}='http://webwork.maa.org/wiki/Category:Problem_Techniques';
300+
$webworkURLs{MathObjectsHelpURL} ='http://webwork.maa.org/wiki/Category:MathObjects';
301+
$webworkURLs{PODHelpURL} ='http://webwork.maa.org/pod/pg_TRUNK/';
302+
$webworkURLs{PGLabHelpURL} ='https://hosted2.webwork.rochester.edu/webwork2/wikiExamples/MathObjectsLabs2/2/?login_practice_user=true';
303+
$webworkURLs{PGMLHelpURL} ='https://courses1.webwork.maa.org/webwork2/cervone_course/PGML/1/?login_practice_user=true';
304+
$webworkURLs{AuthorHelpURL} ='http://webwork.maa.org/wiki/Category:Authors';
305+
298306
# Location of CSS
299307
# $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/${defaultTheme}.css";
300308
# this is never used -- changing the theme from the config panel
@@ -918,6 +926,17 @@ $options{useOPLdefFiles} = 0;
918926
# gap betweens cores in score dropdown - e.g. 5 gives 5, 10, 15, 20
919927
$options{problemGraderScoreDelta} = 5;
920928

929+
##########################################################################################
930+
#### Default settings for the problem editor pages
931+
##########################################################################################
932+
933+
# This sets if the PG editor should use a js based "codemirror" editor or
934+
# just a textarea
935+
$options{PGCodeMirror} = 1;
936+
937+
# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
938+
$options{PGMathView} = 0;
939+
921940
###########################################################################################
922941
#### Default settings for the PG translator
923942
#### This section controls the display of equations, HINTS, answers, SOLUTIONS,
@@ -938,8 +957,6 @@ $pg{options}{showOldAnswers} = 1;
938957
$pg{options}{useMathView} = 1;
939958
# This is the operations file to use for mathview, each contains a different locale.
940959
$pg{options}{mathViewLocale} = "mv_locale_us.js";
941-
# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
942-
$options{PGMathView} = 0;
943960

944961
# Show correct answers (when allowed) by default?
945962
$pg{options}{showCorrectAnswers} = 0; # this is a backup value use when nothing else has been set. I can think of no case where it should anything but zero.
@@ -1065,6 +1082,7 @@ $pg{directories}{macrosPath} = [
10651082
"$courseDirs{templates}/Library/macros/Wiley",
10661083
"$courseDirs{templates}/Library/macros/UBC",
10671084
"$courseDirs{templates}/Library/macros/Hope",
1085+
"$courseDirs{templates}/Library/macros/MC",
10681086
];
10691087

10701088
# The applet search path. If a full URL is given, it is used unmodified. If an
@@ -1210,6 +1228,7 @@ ${pg}{modules} = [
12101228
[qw(Locale::Maketext)],
12111229
[qw(WeBWorK::Localize)],
12121230
[qw(JSON)],
1231+
[qw(Rserve Class::Tiny IO::Handle)],
12131232
];
12141233

12151234
##### Problem creation defaults
@@ -1371,6 +1390,12 @@ $pg{options}{enableProgressBar} = 1;
13711390
# 'checkboxlist' for variables which really hold a list of values which
13721391
# can be independently picked yes/no as checkboxes
13731392

1393+
# Localization Info: The doc strings in this portion are reproduced in
1394+
# lib/WeBWorK/Localize.pm soley so that xgettext.pl will
1395+
# include them when creating .pot files.
1396+
# If you change these strings you should make the corresponding changes in
1397+
# Localize.pm
1398+
13741399
$ConfigValues = [
13751400
['General',
13761401
{ var => 'courseFiles{course_info}',
@@ -1632,14 +1657,6 @@ $ConfigValues = [
16321657
type => 'boolean'
16331658
},
16341659

1635-
# Matrix manipulation in problems has been replaced by MathObjects
1636-
# and this is specific to PG matrix macros
1637-
# { var => 'pg{ansEvalDefaults}{defaultDisplayMatrixStyle}',
1638-
# doc => 'Control string for displaying matrices',
1639-
# doc2 => 'String of three characters for defining the defaults for displaying matrices. The first and last characters give the left and right delimiters of the matrix, so usually one of "(" or "open brackets" or "|" for a left delimiter, and one of ")" or "close brackets" or "|" for the right delimiter. It is also legal to specify "." for no delimiter. <p> The middle character indicates how to display vertical lines in a matrix (e.g., for an augmented matrix). This can be s for solid lines and d for dashed lines. While you can specify the defaults, individual problems may override these values.',
1640-
# type => 'text'
1641-
# },
1642-
16431660
{ var => 'pg{ansEvalDefaults}{numRelPercentTolDefault}',
16441661
doc => 'Allowed error, as a percentage, for numerical comparisons',
16451662
doc2 => "When numerical answers are checked, most test if the student's answer is close enough to the programmed answer be computing the error as a percentage of the correct answer. This value controls the default for how close the student answer has to be in order to be marked correct.<p>A value such as 0.1 means 0.1 percent error is allowed.",
@@ -1685,7 +1702,6 @@ $ConfigValues = [
16851702
},
16861703

16871704
],
1688-
16891705
# PGSimple is not used for now GG
16901706
# ['Editor',
16911707
# { var => 'editor{author}',
@@ -1717,7 +1733,7 @@ $ConfigValues = [
17171733
# doc2 => 'In the PGSimpleEditor, this will automatically fill the text author field',
17181734
# width => 45,
17191735
# type => 'text'
1720-
# }]
1736+
# }]
17211737
];
17221738

17231739

0 commit comments

Comments
 (0)