Skip to content

Commit 3e1b5d7

Browse files
committed
WeBWorK: examples for 2.19
1 parent cb544ca commit 3e1b5d7

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pretext/lib/__pycache__/**
1010
# WW examples
1111
examples/webwork/Makefile.paths
1212
examples/webwork/sample-chapter/generated/*
13-
examples/webwork/minimal/generated/*
13+
examples/webwork/minimal/my-generated/*
1414
# any file ending in ~ (backups, usually)
1515
*~
1616
.vscode

examples/webwork/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,16 @@ PGOUT = $(SCRATCH)/pg
114114
# folder. There are no macros for the minimal example, so omitted.
115115

116116
sample-chapter-macros:
117-
install -d $(PGOUT)/macros
118-
cd $(PGOUT)/macros; \
119-
$(PTX)/pretext/pretext -v -c pg-macros -p $(SMPCPUB) $(SMPC)
117+
$(PTX)/pretext/pretext -v -c pg-macros -p $(SMPCPUB) -d $(PGOUT)/macros $(SMPC)
120118

121119

122120
#########################################################################
123121
# Extract webwork problems into a single XML file.
124122
# Location is within generated folder (named in the publisher file),
125123
# within "webwork" subfolder
124+
# This also produces PG files for each problem, PG macros, set defintion
125+
# files for problem sets, and set header files all within the "webwork/pg"
126+
# folder
126127

127128
sample-chapter-representations:
128129
$(PTX)/pretext/pretext -v -c webwork -p $(SMPCPUB) $(SMPC)
-10.7 KB
Binary file not shown.

examples/webwork/minimal/mini.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
<exercise>
7272
<webwork source="Library/PCC/BasicAlgebra/Geometry/CylinderVolume10.pg"/>
7373
</exercise>
74+
<!-- An exercise with source from a local "external" asset file -->
75+
<!-- The path is relative to the external assets folder -->
76+
<exercise>
77+
<webwork local="pg/newProblem.pg"/>
78+
</exercise>
7479
</section>
7580
</article>
7681
</pretext>

examples/webwork/minimal/publication.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2626
</common>
2727

2828
<source>
29-
<directories generated="generated" external="external"/>
29+
<directories generated="my-generated" external="my-external"/>
3030
</source>
31+
<webwork
32+
server="https://webwork-ptx.aimath.org"
33+
course="anonymous"
34+
user="anonymous"
35+
password="anonymous"
36+
task-reveal="preceding-correct"
37+
static-processing="webwork2"
38+
/>
3139

3240
<!-- These are the defaults but written explicitly here to serve as a model. -->
3341
<webwork

0 commit comments

Comments
 (0)