Skip to content

Commit e258ae2

Browse files
authored
Merge pull request #814 from openwebwork/PG-2.18
PG 2.18
2 parents a29b85f + e85f611 commit e258ae2

File tree

739 files changed

+108482
-121874
lines changed

Some content is hidden

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

739 files changed

+108482
-121874
lines changed

.github/workflows/coverage.yml

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

.github/workflows/linter.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Lint Code Base
3+
4+
defaults:
5+
run:
6+
shell: bash
7+
8+
on:
9+
push:
10+
branches-ignore: [main, develop]
11+
pull_request:
12+
13+
jobs:
14+
perltidy:
15+
name: Run perltidy on Perl Files
16+
runs-on: ubuntu-22.04
17+
container:
18+
image: perl:5.34
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: perl -V
22+
run: perl -V
23+
- name: Install dependencies
24+
run: cpanm -n Perl::Tidy@20220613
25+
- name: perltidy --version
26+
run: perltidy --version
27+
- name: Run perltidy
28+
shell: bash
29+
run: |
30+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
31+
shopt -s extglob globstar nullglob
32+
perltidy --pro=./.perltidyrc -b -bext='/' ./**/*.p[lm] ./**/*.t && git diff --exit-code

.github/workflows/unit-tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Unit Tests
3+
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
unit-tests:
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- name: Checkout PG code
13+
uses: actions/checkout@v3
14+
15+
- name: Install Ubuntu dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y --no-install-recommends --no-install-suggests \
19+
cpanminus \
20+
dvipng \
21+
dvisvgm \
22+
imagemagick \
23+
libclass-accessor-perl \
24+
libclass-tiny-perl \
25+
libdbi-perl \
26+
libencode-perl \
27+
libgd-perl \
28+
libhtml-parser-perl \
29+
libjson-perl \
30+
libjson-xs-perl \
31+
libtest2-suite-perl \
32+
libtie-ixhash-perl \
33+
libuuid-tiny-perl \
34+
libyaml-libyaml-perl \
35+
pdf2svg \
36+
texlive \
37+
texlive-latex-extra \
38+
texlive-latex-recommended \
39+
texlive-plain-generic
40+
41+
- name: Install Perl dependencies
42+
run: cpanm --sudo -fi --notest HTML::TagParser
43+
44+
- name: Run Perl unit tests
45+
run: |
46+
export PG_ROOT=`pwd`
47+
prove -r t

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
lib/chromatic/color
2-
conf/pg_defaults.yml
1+
conf/pg_config.yml
32
*.bak
43
cover_db/
54

65
htdocs/node_modules
76
htdocs/static-assets.json
87
htdocs/**/*.min.js
98
htdocs/**/*.min.css
9+
htdocs/tmp

.perltidyrc

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# PBP .perltidyrc file
2-
-l=120 # Max line width is 120 cols
3-
-et=4 # Use tabs instead of spaces.
4-
-i=4 # Indent level is 4 cols
5-
-ci=4 # Continuation indent is 4 cols
6-
-b # Write the file inline and create a .bak file
7-
-vt=0 # Minimal vertical tightness
8-
-cti=0 # No extra indentation for closing brackets
9-
-pt=2 # Maximum parenthesis tightness
10-
-bt=1 # Medium brace tightness
11-
-sbt=1 # Medium square bracket tightness
12-
-bbt=1 # Medium block brace tightness
13-
-nsfs # No space before semicolons
14-
-nolq # Don't outdent long quoted strings
15-
-mbl=1 # Do not allow multiple empty lines
16-
-ce # Cuddled else
17-
-cb # Cuddled blocks
18-
-nbbc # Do not add blank lines before full length comments
19-
-nbot # No line break on ternary
20-
-nlop # No logical padding (this causes mixed tabs and spaces)
21-
-wn # Weld nested containers
22-
-xci # Extended continuation indentation
2+
-l=120 # Max line width is 120 cols
3+
-et=4 # Use tabs instead of spaces.
4+
-i=4 # Indent level is 4 cols
5+
-ci=4 # Continuation indent is 4 cols
6+
-b # Write the file inline and create a .bak file
7+
-vt=0 # Minimal vertical tightness
8+
-cti=0 # No extra indentation for closing brackets
9+
-pt=2 # Maximum parenthesis tightness
10+
-bt=1 # Medium brace tightness
11+
-sbt=1 # Medium square bracket tightness
12+
-bbt=1 # Medium block brace tightness
13+
-nsfs # No space before semicolons
14+
-nolq # Don't outdent long quoted strings
15+
-mbl=1 # Do not allow multiple empty lines
16+
-ce # Cuddled else
17+
-cb # Cuddled blocks
18+
-nbbc # Do not add blank lines before full length comments
19+
-nbot # No line break on ternary
20+
-nlop # No logical padding (this causes mixed tabs and spaces)
21+
-wn # Weld nested containers
22+
-xci # Extended continuation indentation
23+
-vxl='q' # No vertical alignment of qw quotes

LICENSE

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
WeBWorK
2-
Online Homework Delivery System
3-
Version 2.*
1+
WeBWorK
2+
Online Homework Delivery System
3+
Version 2.*
44

5-
Copyright 2000-2022, The WeBWorK Project
6-
All rights reserved.
5+
Copyright 2000-2023, The WeBWorK Project
6+
All rights reserved.
77

88
This program is free software; you can redistribute it and/or modify
99
it under the terms of either:
10-
10+
1111
a) the GNU General Public License as published by the Free
1212
Software Foundation; either version 2, or (at your option)
1313
any later version, or
@@ -24,7 +24,7 @@
2424
one.
2525

2626
You should also have received a copy of the GNU General Public License
27-
along with this program in the file named "Copying". If not, write to the
28-
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27+
along with this program in the file named "Copying". If not, write to the
28+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2929
02111-1307, USA or visit their web page on the internet at
3030
http://www.gnu.org/copyleft/gpl.html.

README

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
WeBWorK
2-
Program Generation Language
3-
Version 2.*
4-
Branch: https://github.com/openwebwork
5-
6-
7-
http://webwork.maa.org/wiki/Category:Release_Notes
8-
9-
Copyright 2000-2022, The WeBWorK Project
1+
WeBWorK
2+
Program Generation Language
3+
Version 2.*
4+
Branch: https://github.com/openwebwork
5+
6+
7+
http://webwork.maa.org/wiki/Category:Release_Notes
8+
9+
Copyright 2000-2023, The WeBWorK Project
1010
http://webwork.maa.org
11-
All rights reserved.
11+
All rights reserved.

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$PG_VERSION ='2.17';
2-
$PG_COPYRIGHT_YEARS = '1996-2022';
1+
$PG_VERSION ='2.18';
2+
$PG_COPYRIGHT_YEARS = '1996-2023';
33

44
1;

assets/tex/CAPA.tex

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
% capa tex macros
2+
3+
\newcommand{\capa}{{\sl C\kern-.10em\raise-.00ex\hbox{\rm A}\kern-.22em%
4+
{\sl P}\kern-.14em\kern-.01em{\rm A}}}
5+
6+
\newenvironment{choicelist}
7+
{\begin{list}{}
8+
{\setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}
9+
\setlength{\topsep}{0.05in}\setlength{\itemsep}{0.022in}
10+
\setlength{\parsep}{0in}\setlength{\belowdisplayskip}{0.04in}
11+
\setlength{\abovedisplayskip}{0.05in}
12+
\setlength{\abovedisplayshortskip}{-0.04in}
13+
\setlength{\belowdisplayshortskip}{0.04in}}
14+
}
15+
{\end{list}}

assets/tex/PGML.tex

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
% definitions for PGML
2+
3+
\newcount\pgmlCount
4+
\newdimen\pgmlPercent
5+
\newdimen\pgmlPixels
6+
7+
\pgmlPixels=.5pt
8+
9+
{\catcode`\^^M=\active%
10+
\gdef\pgmlSetup{%
11+
\pgmlPercent=.01\hsize%
12+
\parskip=0pt%
13+
\def\par{\ifmmode\else\endgraf\fi\ignorespaces}%
14+
\catcode`\^^M=\active%
15+
\def^^M{\ifmmode\else\space\fi\ignorespaces}}
16+
\global\let^^M\par}%
17+
18+
\def\pgmlIndent{\par\advance\leftskip by 2em \advance\pgmlPercent by .02em \pgmlCount=0}%
19+
\def\pgmlbulletItem{\par\indent\llap{$\bullet$ }\ignorespaces}%
20+
\def\pgmldiscItem{\par\indent\llap{$\bullet$ }\ignorespaces}%
21+
\def\pgmlcircleItem{\par\indent\llap{$\circ$ }\ignorespaces}%
22+
\def\pgmlsquareItem{\par\indent\llap{\vrule height 1ex width .75ex depth -.25ex\ }\ignorespaces}%
23+
\def\pgmlnumericItem{\par\indent\advance\pgmlCount by 1 \llap{\the\pgmlCount. }\ignorespaces}%
24+
\def\pgmlalphaItem{\par\indent{\advance\pgmlCount by `\a \llap{\char\pgmlCount. }}\advance\pgmlCount by 1\ignorespaces}%
25+
\def\pgmlAlphaItem{\par\indent{\advance\pgmlCount by `\A \llap{\char\pgmlCount. }}\advance\pgmlCount by 1\ignorespaces}%
26+
\def\pgmlromanItem{\par\indent\advance\pgmlCount by 1 \llap{\romannumeral\pgmlCount. }\ignorespaces}%
27+
\def\pgmlRomanItem{\par\indent\advance\pgmlCount by 1 \llap{\uppercase\expandafter{\romannumeral\pgmlCount}. }\ignorespaces}%
28+
29+
\def\pgmlCenter{%
30+
\par \parfillskip=0pt
31+
\advance\leftskip by 0pt plus .5\hsize
32+
\advance\rightskip by 0pt plus .5\hsize
33+
\def\pgmlBreak{\break}%
34+
}%
35+
\def\pgmlRight{%
36+
\par \parfillskip=0pt
37+
\advance\leftskip by 0pt plus \hsize
38+
\def\pgmlBreak{\break}%
39+
}%
40+
41+
\def\pgmlBreak{\\}%
42+
43+
\def\pgmlHeading#1{%
44+
\par\bfseries
45+
\ifcase#1 \or\huge \or\LARGE \or\large \or\normalsize \or\footnotesize \or\scriptsize \fi
46+
}%
47+
48+
\def\pgmlRule#1#2{%
49+
\par\noindent
50+
\hbox{%
51+
\strut%
52+
\dimen1=\ht\strutbox%
53+
\advance\dimen1 by -#2%
54+
\divide\dimen1 by 2%
55+
\advance\dimen2 by -\dp\strutbox%
56+
\raise\dimen1\hbox{\vrule width #1 height #2 depth 0pt}%
57+
}%
58+
\par
59+
}%
60+
61+
\def\pgmlIC#1{\futurelet\pgmlNext\pgmlCheckIC}%
62+
\def\pgmlCheckIC{\ifx\pgmlNext\pgmlSpace \/\fi}%
63+
{\def\getSpace#1{\global\let\pgmlSpace= }\getSpace{} }%
64+
65+
{\catcode`\ =12\global\let\pgmlSpaceChar= }%
66+
{\catcode`\^^M=\active%
67+
\gdef\pgmlPreformatted{\par\small\ttfamily\hsize=10\hsize\obeyspaces\catcode`\^^M=\active\let^^M=\pgmlNL\pgmlNL}}%
68+
\def\pgmlNL{\par\bgroup\catcode`\ =12\pgmlTestSpace}%
69+
\def\pgmlTestSpace{\futurelet\next\pgmlTestChar}%
70+
\def\pgmlTestChar{\ifx\next\pgmlSpaceChar\ \pgmlTestNext\fi\egroup}%
71+
\def\pgmlTestNext\fi\egroup#1{\fi\pgmlTestSpace}%

0 commit comments

Comments
 (0)