Skip to content

Commit 56f9d02

Browse files
authored
Merge pull request #2903 from drgrice1/remove-capa
Remove everything CAPA.
2 parents 34f51ee + 33e9334 commit 56f9d02

9 files changed

Lines changed: 15 additions & 106 deletions

File tree

conf/defaults.config

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ $courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge";
446446
# course links that are regulated by webwork2
447447
$courseLinks{Library} = [ $problemLibrary{root}, "$courseDirs{templates}/Library" ];
448448
$courseLinks{Contrib} = [ $contribLibrary{root}, "$courseDirs{templates}/Contrib" ];
449-
$courseLinks{capaLibrary} = [ "$contribLibrary{root}/CAPA", "$courseDirs{templates}/capaLibrary" ];
450449
$courseLinks{Student_Orientation} = [ "$webworkDirs{assets}/pg/Student_Orientation", "$courseDirs{templates}/Student_Orientation" ];
451450

452451
################################################################################
@@ -562,12 +561,10 @@ $uneditableCourseFiles = [
562561
# activated below gives access to all the directories in the National
563562
# Problem Library.
564563
#
565-
$courseFiles{problibs} = {
566-
Library => "OPL Directory",
567-
Contrib => "Contrib", # remember to create link from Contrib to Contrib
568-
# library directory
569-
capaLibrary => "CAPA", # remember to create link from capaLibrary to CAPA
570-
# in contrib
564+
$courseFiles{problibs} = {
565+
Library => "OPL Directory",
566+
Contrib => "Contrib", # remember to create link from Contrib to Contrib
567+
# library directory
571568
};
572569

573570
################################################################################
@@ -1149,7 +1146,6 @@ $pg{directories}{macrosPath} = [
11491146
$courseDirs{macros},
11501147
$pg{directories}{macros},
11511148
"$pg{directories}{macros}/answers",
1152-
"$pg{directories}{macros}/capa",
11531149
"$pg{directories}{macros}/contexts",
11541150
"$pg{directories}{macros}/core",
11551151
"$pg{directories}{macros}/graph",
@@ -1199,25 +1195,6 @@ $pg{specialPGEnvironmentVars}{latexImageSVGMethod} = "dvisvgm";
11991195
# convert <input options> file.ext1 <output options> file.ext2
12001196
$pg{specialPGEnvironmentVars}{latexImageConvertOptions} = {input => {density => 300}, output => {quality => 100}};
12011197

1202-
# set the flags immediately above in the $pg{options} section above -- not here.
1203-
1204-
# Locations of CAPA resources. (Only necessary if you need to use converted CAPA
1205-
# problems.)
1206-
################################################################################
1207-
# "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
1208-
################################################################################
1209-
1210-
$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools/",
1211-
$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools/",
1212-
$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{templates}/Contrib/CAPA/CAPA_Graphics/",
1213-
$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$webworkURLs{htdocs}/CAPA_Graphics/",
1214-
1215-
push @{$pg{directories}{macrosPath}},
1216-
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools",
1217-
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools";
1218-
1219-
# The link Contrib in the course templates directory should point to ../webwork-open-problem-library/Contrib
1220-
# The link webwork2/htdocs/CAPA_Graphics should point to ../webwork-open-problem-library/Contrib/CAPA/macros/CAPA_graphics
12211198
# Size in pixels of dynamically-generated images, i.e. graphs.
12221199
$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
12231200

conf/localOverrides.conf.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ $mail{feedbackRecipients} = [
183183
# Problem Library.
184184

185185
#$courseFiles{problibs} = {
186-
#Library => "OPL Directory",
187-
#capaLibrary => "CAPA",
188-
#Contrib => "Contrib",
186+
#Library => "OPL Directory",
187+
#Contrib => "Contrib",
189188
# the following are not really needed but you can
190189
# create links to your own private libraries this way.
191190
#rochesterLibrary => "Rochester",

courses.dist/modelCourse/templates/capaLibrary

Lines changed: 0 additions & 1 deletion
This file was deleted.

courses.dist/modelCourse/templates/setDemo/prob0837.pg

Lines changed: 0 additions & 64 deletions
This file was deleted.

htdocs/show-source.cgi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ my $filedir = $file =~ s!/[^/]+$!!r;
1414
$file =~ s!.*/!!;
1515

1616
my @PGdirs = (
17-
"../templates$filedir", '../templates/macros', "$root/pg/macros", "$root/pg/macros/answers",
18-
"$root/pg/macros/capa", "$root/pg/macros/contexts", "$root/pg/macros/core", "$root/pg/macros/deprecated",
19-
"$root/pg/macros/graph", "$root/pg/macros/math", "$root/pg/macros/misc", "$root/pg/macros/parsers",
20-
"$root/pg/macros/ui",
17+
"../templates$filedir", '../templates/macros',
18+
"$root/pg/macros", "$root/pg/macros/answers",
19+
"$root/pg/macros/contexts", "$root/pg/macros/core",
20+
"$root/pg/macros/deprecated", "$root/pg/macros/graph",
21+
"$root/pg/macros/math", "$root/pg/macros/misc",
22+
"$root/pg/macros/parsers", "$root/pg/macros/ui",
2123
);
2224

2325
for my $dir (@PGdirs) { ShowSource("$dir/$file") if (-e "$dir/$file") }

lib/HardcopyRenderedProblem.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ sub generate_hardcopy_tex {
120120
if $@;
121121
}
122122
my $pgAssetsTex_dir = path($ce->{pg}{directories}{assetsTex});
123-
for (qw{pg.sty PGML.tex CAPA.tex}) {
123+
for (qw{pg.sty PGML.tex}) {
124124
eval { $pgAssetsTex_dir->child($_)->copy_to($working_dir) };
125125
push(@$errors, qq{Failed to copy "$ce->{pg}{directories}{assetsTex}/$_" into directory "$working_dir": $@})
126126
if $@;

lib/WeBWorK/ContentGenerator/Hardcopy.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ sub generate_hardcopy_tex ($c, $temp_dir_path, $final_file_basename) {
674674
);
675675
}
676676
}
677-
for (qw{pg.sty PGML.tex CAPA.tex}) {
677+
for (qw{pg.sty PGML.tex}) {
678678
eval { Mojo::File->new("$ce->{pg}{directories}{assetsTex}/$_")->copy_to($bundle_path) };
679679
if ($@) {
680680
$c->add_error(

lib/WeBWorK/Utils/Instructor.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,7 @@ sub getDefList {
554554
find(
555555
{
556556
wanted => sub {
557-
if ($File::Find::dir =~ /^$topdir\/Library/
558-
|| $File::Find::dir =~ /^$topdir\/Contrib/
559-
|| $File::Find::dir =~ /^$topdir\/capaLibrary/)
560-
{
557+
if ($File::Find::dir =~ /^$topdir\/Library/ || $File::Find::dir =~ /^$topdir\/Contrib/) {
561558
$File::Find::prune = 1;
562559
return;
563560
}

lib/WeBWorK/Utils/Rendering.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ sub constructPGOptions ($ce, $user, $set, $problem, $psvn, $formFields, $transla
191191
tmpl => $ce->{courseDirs}{templates}, # ditto
192192
};
193193

194-
# Variables for interpreting capa problems and other things to be seen in a pg file.
195194
$options{specialPGEnvironmentVars} = $ce->{pg}{specialPGEnvironmentVars};
196195

197196
return %options;

0 commit comments

Comments
 (0)