Skip to content

Commit 045cec1

Browse files
committed
FIX: errors after rebasing.
1 parent 206381a commit 045cec1

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

lib/WeBWorK3/Utils/Settings.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use DateTime::TimeZone;
2323
use JSON::PP;
2424
use Array::Utils qw/array_minus/;
2525

26-
my @allowed_fields = qw/var category subcategory doc doc2 default type options/;
27-
my @required_fields = qw/var doc type default/;
26+
my @allowed_fields = qw/setting_name category subcategory description doc default_value type options/;
27+
my @required_fields = qw/setting_name description type default_value/;
2828

2929
=head1 loadDefaultCourseSettings
3030
@@ -167,6 +167,7 @@ sub validateMultilist ($setting, $value) {
167167
throw DB::Exception::InvalidCourseFieldType->throw(
168168
message => "The values for $setting->{setting_name} must be a subset of the options field")
169169
unless scalar(@diff) == 0;
170+
return 1;
170171
}
171172

172173
# Test for an integer.

t/db/002_course_settings.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use DB::Schema;
2424
use WeBWorK3::Utils::Settings qw/isInteger isTimeString isTimeDuration isDecimal mergeCourseSettings
2525
isValidSetting/;
2626

27-
use DB::TestUtils qw/removeIDs loadCSV/;
27+
use TestUtils qw/removeIDs loadCSV/;
2828

2929
# Load the database
3030
my $config_file = "$main::ww3_dir/conf/webwork3-test.yml";

t/db/build_db.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ BEGIN
2828
my $verbose = 1;
2929

3030
# Load the configuration for the database settings.
31-
my $config_file = "$main::ww3_dir/conf/ww3-dev.yml";
32-
$config_file = "$main::ww3_dir/conf/ww3-dev.dist.yml" unless (-e $config_file);
31+
my $config_file = "$main::ww3_dir/conf/webwork3-test.yml";
32+
$config_file = "$main::ww3_dir/conf/webwork3-test.dist.yml" unless (-e $config_file);
3333

3434
# the YAML true/false will be loaded a JSON booleans.
3535
local $YAML::XS::Boolean = "JSON::PP";

t/mojolicious/015_course_settings.t

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ BEGIN {
1515
}
1616

1717
use lib "$main::ww3_dir/lib";
18+
use lib "$main::ww3_dir/t/lib";
1819

1920
use Clone qw/clone/;
2021
use YAML::XS qw/LoadFile/;
2122
use List::MoreUtils qw/firstval/;
2223

23-
use DB::TestUtils qw/loadCSV removeIDs/;
24+
use TestUtils qw/loadCSV removeIDs/;
2425

2526
# Load the config file.
26-
my $config_file = "$main::ww3_dir/conf/ww3-dev.yml";
27-
$config_file = "$main::ww3_dir/conf/ww3-dev.dist.yml" unless (-e $config_file);
27+
my $config_file = "$main::ww3_dir/conf/webwork3-test.yml";
28+
$config_file = "$main::ww3_dir/conf/webwork3-test.dist.yml" unless (-e $config_file);
2829

2930
# the YAML true/false will be loaded a JSON booleans.
3031
local $YAML::XS::Boolean = "JSON::PP";

0 commit comments

Comments
 (0)