From ac513fa3397cb38ba041158754679c1f1befc4f1 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 12 Feb 2026 16:19:02 -0600 Subject: [PATCH] Fix an issue with adding users when the accomodation_time_factor is not set. The `addUser` method just sets the `accomodation_time_factor` if it is not defined. This was reported in issue #2910, and fixes that issue and most likely other places where users are added without explicitly setting the `accomodation_time_factor`. --- lib/WeBWorK/DB.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/WeBWorK/DB.pm b/lib/WeBWorK/DB.pm index 5ccf5e0eba..b602c00f06 100644 --- a/lib/WeBWorK/DB.pm +++ b/lib/WeBWorK/DB.pm @@ -472,6 +472,7 @@ sub getUsers { sub addUser { my ($self, $User) = shift->checkArgs(\@_, qw/REC:user/); + $User->accommodation_time_factor(1) unless defined $User->accommodation_time_factor; return $self->{user}->add($User); }