Skip to content

Fix an issue with the addcourse script.#2957

Open
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
drgrice1:bugfix/another-accommodation-time-factor-issue
Open

Fix an issue with the addcourse script.#2957
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
drgrice1:bugfix/another-accommodation-time-factor-issue

Conversation

@drgrice1
Copy link
Copy Markdown
Member

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.

It seems that perltidy was also run on the file. I just noticed that now when I review this in preparation to create the pull request.

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.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Apr 22, 2026
Update to node 24 in the build instead of node 20.

Update the Perl::Tidy version to the version currently used in
development.

Don't install the `Statistics::R::IO` module.  That is not used anymore.

Update to the mariadb 10.11 docker image for the database volume. That
should have been done before when I updated the docker build to Ubuntu
24.  That matches the version of mariadb in Ubuntu 24.

Remove the `--db-layout` option that was passed to the `addcourse`
script.  That is not valid for the script anymore.

Note that this depends on openwebwork#2957, since the docker build will fail
without the bug in the `addcourse` script fixed.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Apr 22, 2026
Update to node 24 in the build instead of node 20.

Update the Perl::Tidy version to the version currently used in
development.

Don't install the `Statistics::R::IO` module.  That is not used anymore.

Update to the mariadb 10.11 docker image for the database volume. That
should have been done before when I updated the docker build to Ubuntu
24.  That matches the version of mariadb in Ubuntu 24.

Remove the `--db-layout` option that was passed to the `addcourse`
script.  That is not valid for the script anymore.

Note that this depends on openwebwork#2957, since the docker build will fail
without the bug in the `addcourse` script fixed.
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.

1 participant