Skip to content

WeBWorK 2.21 Release Candidate#2940

Open
drgrice1 wants to merge 317 commits intomainfrom
WeBWorK-2.21
Open

WeBWorK 2.21 Release Candidate#2940
drgrice1 wants to merge 317 commits intomainfrom
WeBWorK-2.21

Conversation

@drgrice1
Copy link
Copy Markdown
Member

This is the release candidate for WeBWorK 2.21. Please re-target any pull requests that you want to get into the release for this branch.

transifex-integration Bot and others added 30 commits July 20, 2025 06:14
42% of minimum 1% translated source file: 'webwork2.pot'
on 'el'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
11% of minimum 1% translated source file: 'webwork2.pot'
on 'ko'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
12% of minimum 1% translated source file: 'webwork2.pot'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
Currently if the session has expired and one of the options in the
"Format Code" tabe is used in the PG problem editor, then the message
reads `Error: can't access property "status", t.result_data is
undefined` which is not very informative. This makes it so that the
error message in the response which is `Error: Authentication failed.
Log in again to continue.`

An easy way to test this is to open a problem in the problem editor,
delete the cookie for the session in the developer tools, and then
switch to the "Format Code" tabe and click the "Format Code" button.
If one of the course links that are now maintained by webwork points to
a location inside a non existent directory, then the `realpath` calls in
`lib/WeBWorK/Utils/CourseDirectoryIntegrityCheck.pm` throw exceptions.
This occurs both when checking for course upgrades and when upgrading
courses.  So those calls are wrapped in evals to prevent the exceptions.

I have identified this as the cause of the issue discussed in
https://forums.openwebwork.org/mod/forum/discuss.php?d=8757#p22321.

To test this delete the Contrib link in a course's templates directory,
and create a bad link with something like

```bash
sudo ln -s /bad/location /opt/webwork/courses/courseId/templates/Contrib
```

Then go to the "Upgrade Courses" page in the admin course.  It will give
an error with the current develop or main branches.  With this pull
request it will show that the link structure of the course needs repair.
Furthermore, repairing the link will work.
Allow @ in user id when adding new course.
Fix a `realpath` failure when resolving course symlinks.
…a launch request.

In this case the LTIAuthenError stash value is set, but that error is
never shown anywhere because the course ID was not determined and the
authen verify method is never called.  So this information goes to the
abyss and the debug log abrubtly terminates (see
https://forums.openwebwork.org/mod/forum/discuss.php?d=8749 for what
this debug log looks like).  So this pull request always debug logs it
in this case.  There is not enough information to even determine if LTI
debugging is enabled for the course (which the request failed to
determine), so it has to be the more general debug logging facility.
This may help in resolving the issues that are occuring with the cases
such as those in the above mentioned forum post and
https://forums.openwebwork.org/mod/forum/discuss.php?d=8738#p22228.
This is the maximum number of seconds that exp and iat values in the JWT
sent with a launch request are allowed to be in the future relative to
the current time on the webwork2 server.  The Crypt::JWT module by
default uses a value of 0 for this, meaning that the iat and exp values
in the token must be before the current time on the webwork2 server.

This may be why many are experiencing issues with JWT tokens failing to
validate, and is due to the clock on the LMS server being ahead of the
clock on the webwork2 server. Generally such issues can be resolved by
synchronizing clocks, but in some cases a small leeway may be needed.
Add an LTI 1.3 debug log in the case that the JWT fails to decode on a launch request.
This only causes an issue when debug_lti_grade_passback is set, but is
an obvious typo that needs to be fixed.
The `can_use` method of the `NoReducedCred.pm` achiievent item returns 0
unless the condition for which it can be used is true, and then there is
no follow up return value for the case that the condition is true.  As a
result the method always returns a false value.  Thus the achievement
item can never be used.

Since the result of the `can_use` method is used in a purely boolean
fashion it should just return the condition result.
…n tests.

This fixes issue #2808.

See that issue and my comment at #2808 (comment)
for an explanation of this fix.
…erval

Cap the delay on the interval that the server time delta is updated in tests.
Fix an error that makes the `NoReducedCred` achievement item unusable.
Fix checkSet to honour the ignoreMissingSourcedID setting
…eck boxes.

To fix this `returning => 1` needs to be added to the parameters.

This fixes issue #2800.
The following dependencies are updated:

* @fortawesome/fontawesome-free: 6.52 -> 7.0.0
* bootstrap: 5.3.3 -> 5.3.7
* iframe-resizer: 4.3.11 -> 4.4.2
* jquery-ui-dist: 1.13.2 -> 1.13.3
* luxon: 3.4.4 -> 3.7.1
* sortablejs: 1.15.2 -> 1.15.6
* autoprefixer: 10.4.19 -> 10.4.21
* chokidar: 3.6.0 -> 4.0.3
* cssnano: 6.1.2 -> 7.1.0
* postcss: 8.4.38 -> 8.5.6
* prettier: 3.2.5 -> 3.6.2
* rtlcss: 4.1.1 -> 4.3.0
* sass: 1.75.0 -> 1.90.0
* terser: 5.30.4 -> 5.43.1
* yargs: 17.7.2 -> 18.0.0

All libraries except for `iframe-resizer` are at their latest versions.
The `iframe-resizer` library has changed considerably and upgrading to
the latest version requires quite a few changes. Furthermore, they now
have a commercial license version (which requires purchase) and an open
source license version. We can use the open source version, but there
are some annoying things that they do with that (like console logs that
you can't prevent). I have chosen the last version available before
things went haywire and `iframe-resizer` started doing stupid things.

Note that the there are two changes to the the generate-assets.js script
that were needed. There is a change in how yargs is used, and an option
needed to be added to the `sass.compile` call to disable warnings about
deprecated sass usage in Bootstrap's scss.
"byC mment()" -> "byComment()"
…ort-fix-develop

Fix sort by comment descending in Accounts Manager
The buttons go to the next or previous page.  If there is only one
problem per page, then the buttons are "Previous Problem" and "Next
Problem" buttons.  Otherwise they are "Previous Page" and "Next Page"
buttons.  These buttons are shown below the page/problem navigation
links and like those links are shown both at the top and bottom of the
page.  This means that these buttons are above the "Grade Test" button
at the bottom of the page, making it much clearer to students that there
are more problems than those shown on the page.

Note these buttons are not shown if all problems are on one page.

This was requested in issue #2814.

Also fix a couple of HTML validation issues that I observed.

First, the "preview answer" buttons had a `data_page_number` attribute.
The underscores are not the valid format for data attributes.  They
should be hyphens. I.e., kebab case, not snake case.  This was caused by
using the incorrect format for the data attribute argument to the
`link_to` method.  This was my fault and was done when I initially
converted to Mojolicious.

The other issue only occurs when the number of problems in the test is
not evenly divisible by the number of problems per page.  This resulted
in the wrong number of columns in the problem/page navigation links
table for the `colgroup` definition of the last column.
Fix the filter on the student progress page not honoring unchecked check boxes.
drgrice1 and others added 30 commits April 8, 2026 14:56
… page.

Currently that style is defined in the `system.scss` and is not scoped.
As a result it applies to most content generator pages of webwork2.  In
particular it applies to problem pages, and thus it affects draggable
proof problems which use the same sortablejs library with that same css
class.

Note that a related pull request to PG will change the styles for drag
and drop problems and this conflicts with that.  This is probably
already a problem because the opacity of 0.5 does make the drag and drop
elements in problems lack sufficient contrast. Although it only occurs
during a mouse drag and in that situation perhaps that contrast is not
necessary. Still I think there is a better way to do this for problems.

On a related note to the PG pull request, perhaps at some point keyboard
support should be added for reorganizing problems on the problem set
detail page.
When saving a problem in a new location in the PGProblemEditor,
add an option to copy auxiliary files or not. Since it is not
possible to determine what files are needed, all auxiliary files
were copied in all cases. This allows the user to uncheck the
"Copy auxiliary files" option to not copy any auxiliary files.

The default option is to copy auxiliary files which has not
changed. This only allows the user to disable that if they are
sure no auxiliary files are needed.

This also adds a check so the message about auxiliary files
being copied only shows if at least one file was copied.
Updated packages have been published, and this just updates the
package.json file to point to the latest version.

The dependencies of the `pg-codemirror-editor` and `codemirror-lang-pg`
packages were updated (largely to deal with security vulnerabilities in
the dependencies).

There is also a bug fixed with builtin operator names occuring as the
key of a hash. For example, the keys of the following hash are builtin
operators, but should not be interpreted as such in this context.

```perl
%hash = (
    step    => 1,
    defined => 1,
    split   => 1
);
```

Since they were the hask key value pair was not parsing, and so all
syntax highlighting after it is messed up.

The first key `step` is a PG operator, the second `defined` is a Perl
named unary operator, the third `split` is a Perl list operator.  Of
course any of the other PG operators, Perl named unary operators, or
Perl list operators had the same problem since they are all handled in
the code by the same external tokenizer.
This adds some spacing between the set link and the info icon to
make it accessible on small touch screens to give enough space to
touch the icon without hitting the link instead.
There is no longer a `pgwarning` key set on the controller object for
the `lib/WeBWorK/ContentGenerator/Problem.pm` module and never was a
`pgwarning` key for the returned pg object in the
`lib/ContentGenerator/GatewayQuiz.pm` module.  So use the correct key on
the returned pg object in both cases.  That is the `warning_messages`
key.

The warning messages were still being shown at the bottom, but not the
message at the top of the page notifying of the existence of those
warnings.  Since the warnings at the bottom might not be visible, the
warnings may be missed.
Co-authored-by: Glenn Rice <47527406+drgrice1@users.noreply.github.com>
Co-authored-by: Glenn Rice <47527406+drgrice1@users.noreply.github.com>
Co-authored-by: Glenn Rice <47527406+drgrice1@users.noreply.github.com>
I removed the `reference-link` class from these links in #2896.  That
was a mistake.  That class does do something.  It is what the javascript
uses to determine which links need the tooltips. So add those back.
Also, the `writeCourseConf` method doesn't need any arguments other than
the file handle anymore, so eliminate those.
Add horizontal padding to set info icon.
Fix Resurrect Achievement Items
PGProblemEditor: Add option to copy auxiliary files.
…tips

Fix the reference link tooltips on the PG Problem Editor page.
Fix a minor issue with the datepicker.
Properly scope the `.sortable-ghost` style for the problem set detail page.
Completely remove the `courseOptions` option for the `addCourse` method.
This is the same one that the dependabot made a pull request to main
for except goes to the lates version of postcss.
Remove PRINT_FILE_NAMES_FOR and PRINT_FILE_NAMES_PERMISSION_LEVEL
The `addcourse` script does not use a database object to create a user
record.  Instead it directly calls `WeBWorK::DB::Record::User->new(%record)`.
So if the `%record` hash does not have the `accommodation_time_factor`
key set, then the script errors out when it attempts to create a user.
So make sure that is set.
…ime-factor-issue

Fix an issue with the `addcourse` script.
Update the version to 2.21 and the copyright years to include 2026.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants