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
31 changes: 4 additions & 27 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ $courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge";
# course links that are regulated by webwork2
$courseLinks{Library} = [ $problemLibrary{root}, "$courseDirs{templates}/Library" ];
$courseLinks{Contrib} = [ $contribLibrary{root}, "$courseDirs{templates}/Contrib" ];
$courseLinks{capaLibrary} = [ "$contribLibrary{root}/CAPA", "$courseDirs{templates}/capaLibrary" ];
$courseLinks{Student_Orientation} = [ "$webworkDirs{assets}/pg/Student_Orientation", "$courseDirs{templates}/Student_Orientation" ];

################################################################################
Expand Down Expand Up @@ -567,12 +566,10 @@ $uneditableCourseFiles = [
# activated below gives access to all the directories in the National
# Problem Library.
#
$courseFiles{problibs} = {
Library => "OPL Directory",
Contrib => "Contrib", # remember to create link from Contrib to Contrib
# library directory
capaLibrary => "CAPA", # remember to create link from capaLibrary to CAPA
# in contrib
$courseFiles{problibs} = {
Library => "OPL Directory",
Contrib => "Contrib", # remember to create link from Contrib to Contrib
# library directory
};

################################################################################
Expand Down Expand Up @@ -1154,7 +1151,6 @@ $pg{directories}{macrosPath} = [
$courseDirs{macros},
$pg{directories}{macros},
"$pg{directories}{macros}/answers",
"$pg{directories}{macros}/capa",
"$pg{directories}{macros}/contexts",
"$pg{directories}{macros}/core",
"$pg{directories}{macros}/graph",
Expand Down Expand Up @@ -1204,25 +1200,6 @@ $pg{specialPGEnvironmentVars}{latexImageSVGMethod} = "dvisvgm";
# convert <input options> file.ext1 <output options> file.ext2
$pg{specialPGEnvironmentVars}{latexImageConvertOptions} = {input => {density => 300}, output => {quality => 100}};

# set the flags immediately above in the $pg{options} section above -- not here.

# Locations of CAPA resources. (Only necessary if you need to use converted CAPA
# problems.)
################################################################################
# "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
################################################################################

$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools/",
$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools/",
$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{templates}/Contrib/CAPA/CAPA_Graphics/",
$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$webworkURLs{htdocs}/CAPA_Graphics/",

push @{$pg{directories}{macrosPath}},
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools",
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools";

# The link Contrib in the course templates directory should point to ../webwork-open-problem-library/Contrib
# The link webwork2/htdocs/CAPA_Graphics should point to ../webwork-open-problem-library/Contrib/CAPA/macros/CAPA_graphics
# Size in pixels of dynamically-generated images, i.e. graphs.
$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,

Expand Down
5 changes: 2 additions & 3 deletions conf/localOverrides.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ $mail{feedbackRecipients} = [
# Problem Library.

#$courseFiles{problibs} = {
#Library => "OPL Directory",
#capaLibrary => "CAPA",
#Contrib => "Contrib",
#Library => "OPL Directory",
#Contrib => "Contrib",
# the following are not really needed but you can
# create links to your own private libraries this way.
#rochesterLibrary => "Rochester",
Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/capaLibrary

This file was deleted.

64 changes: 0 additions & 64 deletions courses.dist/modelCourse/templates/setDemo/prob0837.pg

This file was deleted.

10 changes: 6 additions & 4 deletions htdocs/show-source.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ my $filedir = $file =~ s!/[^/]+$!!r;
$file =~ s!.*/!!;

my @PGdirs = (
"../templates$filedir", '../templates/macros', "$root/pg/macros", "$root/pg/macros/answers",
"$root/pg/macros/capa", "$root/pg/macros/contexts", "$root/pg/macros/core", "$root/pg/macros/deprecated",
"$root/pg/macros/graph", "$root/pg/macros/math", "$root/pg/macros/misc", "$root/pg/macros/parsers",
"$root/pg/macros/ui",
"../templates$filedir", '../templates/macros',
"$root/pg/macros", "$root/pg/macros/answers",
"$root/pg/macros/contexts", "$root/pg/macros/core",
"$root/pg/macros/deprecated", "$root/pg/macros/graph",
"$root/pg/macros/math", "$root/pg/macros/misc",
"$root/pg/macros/parsers", "$root/pg/macros/ui",
);

for my $dir (@PGdirs) { ShowSource("$dir/$file") if (-e "$dir/$file") }
Expand Down
2 changes: 1 addition & 1 deletion lib/HardcopyRenderedProblem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ sub generate_hardcopy_tex {
if $@;
}
my $pgAssetsTex_dir = path($ce->{pg}{directories}{assetsTex});
for (qw{pg.sty PGML.tex CAPA.tex}) {
for (qw{pg.sty PGML.tex}) {
eval { $pgAssetsTex_dir->child($_)->copy_to($working_dir) };
push(@$errors, qq{Failed to copy "$ce->{pg}{directories}{assetsTex}/$_" into directory "$working_dir": $@})
if $@;
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/ContentGenerator/Hardcopy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ sub generate_hardcopy_tex ($c, $temp_dir_path, $final_file_basename) {
);
}
}
for (qw{pg.sty PGML.tex CAPA.tex}) {
for (qw{pg.sty PGML.tex}) {
eval { Mojo::File->new("$ce->{pg}{directories}{assetsTex}/$_")->copy_to($bundle_path) };
if ($@) {
$c->add_error(
Expand Down
5 changes: 1 addition & 4 deletions lib/WeBWorK/Utils/Instructor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,7 @@ sub getDefList {
find(
{
wanted => sub {
if ($File::Find::dir =~ /^$topdir\/Library/
|| $File::Find::dir =~ /^$topdir\/Contrib/
|| $File::Find::dir =~ /^$topdir\/capaLibrary/)
{
if ($File::Find::dir =~ /^$topdir\/Library/ || $File::Find::dir =~ /^$topdir\/Contrib/) {
$File::Find::prune = 1;
return;
}
Expand Down
1 change: 0 additions & 1 deletion lib/WeBWorK/Utils/Rendering.pm
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ sub constructPGOptions ($ce, $user, $set, $problem, $psvn, $formFields, $transla
tmpl => $ce->{courseDirs}{templates}, # ditto
};

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

return %options;
Expand Down