Skip to content

Commit 33e9334

Browse files
committed
Remove everything CAPA.
The CAPA problems have now been removed from the Contrib section of the OPL (see openwebwork/webwork-open-problem-library#1277). So this is not needed anymore. Note that the `courses.dist/modelCourse/templates/setDemo/prob0837.pg` problem is already unused (it is not in the `setDemo.def` file).
1 parent 2d11be7 commit 33e9334

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
@@ -451,7 +451,6 @@ $courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge";
451451
# course links that are regulated by webwork2
452452
$courseLinks{Library} = [ $problemLibrary{root}, "$courseDirs{templates}/Library" ];
453453
$courseLinks{Contrib} = [ $contribLibrary{root}, "$courseDirs{templates}/Contrib" ];
454-
$courseLinks{capaLibrary} = [ "$contribLibrary{root}/CAPA", "$courseDirs{templates}/capaLibrary" ];
455454
$courseLinks{Student_Orientation} = [ "$webworkDirs{assets}/pg/Student_Orientation", "$courseDirs{templates}/Student_Orientation" ];
456455

457456
################################################################################
@@ -567,12 +566,10 @@ $uneditableCourseFiles = [
567566
# activated below gives access to all the directories in the National
568567
# Problem Library.
569568
#
570-
$courseFiles{problibs} = {
571-
Library => "OPL Directory",
572-
Contrib => "Contrib", # remember to create link from Contrib to Contrib
573-
# library directory
574-
capaLibrary => "CAPA", # remember to create link from capaLibrary to CAPA
575-
# in contrib
569+
$courseFiles{problibs} = {
570+
Library => "OPL Directory",
571+
Contrib => "Contrib", # remember to create link from Contrib to Contrib
572+
# library directory
576573
};
577574

578575
################################################################################
@@ -1154,7 +1151,6 @@ $pg{directories}{macrosPath} = [
11541151
$courseDirs{macros},
11551152
$pg{directories}{macros},
11561153
"$pg{directories}{macros}/answers",
1157-
"$pg{directories}{macros}/capa",
11581154
"$pg{directories}{macros}/contexts",
11591155
"$pg{directories}{macros}/core",
11601156
"$pg{directories}{macros}/graph",
@@ -1204,25 +1200,6 @@ $pg{specialPGEnvironmentVars}{latexImageSVGMethod} = "dvisvgm";
12041200
# convert <input options> file.ext1 <output options> file.ext2
12051201
$pg{specialPGEnvironmentVars}{latexImageConvertOptions} = {input => {density => 300}, output => {quality => 100}};
12061202

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

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
@@ -192,7 +192,6 @@ sub constructPGOptions ($ce, $user, $set, $problem, $psvn, $formFields, $transla
192192
tmpl => $ce->{courseDirs}{templates}, # ditto
193193
};
194194

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

198197
return %options;

0 commit comments

Comments
 (0)