forked from xcompass/webwork2
/
localOverrides.conf.dist
871 lines (709 loc) · 38.9 KB
/
localOverrides.conf.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
#!perl
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2022 The WeBWorK Project, https://github.com/openwebwork
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the
# Artistic License for more details.
################################################################################
# This file should be used to override any of the default settings in defaults.config.
# The most commonly changed settings are provided as examples below, but any directive
# in defaults.config can be copied to this file with the value changed.
# If you wish to make changes to an individual course, copy the entry into the
# course.conf file in the respective course directory.
################################################################################
# localOverrides.conf -- this file
################################################################################
# localOverrides.conf contains the local modifications commonly made
# when installing WeBWorK on a new site. The configurations in defaults.config
# and in database.conf can usually remain untouched.
#
# localOverride.conf is the appropriate place to override permission settings,
# paths to macros and other customizations that are specific to your
# WeBWorK site
################################################################################
# Additional mail settings in defaults.config can be overridden here
################################################################################
# This setting is only used if you need to send email from within a PG problem
# (e.g. surveys, essay questions). It is not necessary for using the email
# tools in WeBWorK. You can set email addresses here for users who need to
# receive email from problems in all courses, or in course.conf for professors
# who will receive email from problems in a single course.
$mail{feedbackRecipients} = [
#'prof1@yourserver.yourdomain.edu',
#'prof2@yourserver.yourdomain.edu',
];
# Should the studentID be included in the feedback email when feedbackVerbosity > 0:
# The default is yes. Uncomment the line below to block it from being included.
# Blocking it from being included is recommended if the studentID is "personal"
# informations whose privacy should be maintained (ex. a government issued ID number).
# The setting can also be made in the course.conf file for specific courses.
#$blockStudentIDinFeedback = 1;
### additional mail overrides
# Use this to customize the text of the feedback button.
#$feedback_button_name = "Email Instructor";
################################################################################
# Repository Information
###############################################################################
# This is where you put your custom remote and branch for your WeBWorK, PG and OPL
# github repositories.
# To disable checking for a particular repository, set the remote and branch
# variables to be empty strings.
# Note: This process uses git ls-remote which can be very slow on some
# systems, so it is disabled by default. Enabling this may make the course
# list page in the admin course very slow.
#$enableGitUpgradeNotifier = 1;
$gitWeBWorKRemoteName = "origin";
$gitWeBWorKBranchName = "ubc";
$gitPGRemoteName = "origin";
$gitPGBranchName = "main";
$gitLibraryRemoteName = "origin";
$gitLibraryBranchName = "ubc";
################################################################################
# Theme
################################################################################
#$defaultTheme = "math4";
#$defaultThemeTemplate = "system";
# The institution logo should be an image file in the theme's images folder
#$institutionLogo = 'my_school_logo.png';
#$institutionURL = 'http://www.myschool.edu';
#$institutionName = 'My University';
################################################################################
# Language
################################################################################
$language = "en";
# Check the directory .../webwork2/lib/WeBWorK/Localize to what languages are
# currently supported (e.g. en, es,. fr, heb, tr, zk_hk).
################################################################################
# Default screen header files
################################################################################
# This is the site_info file. The default filename is site_info.txt.
# You should consider changing this to point to a file which is not tracked by
# git, as any changes you make to site_info.txt will be overwritten if you
# upgrade WeBWorK to a new version.
#$webworkFiles{site_info} = "$webworkDirs{htdocs}/our_site_info.txt";
# The setHeader precedes each set in hardcopy output. It is a PG file.
# Uncomment one of these to use a file from within the course templates directory
# rather than a centrally-stored file shared by all courses.
#$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg";
#$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg";
# The set header is displayed on the problem set page. It is a PG file.
# One of these default files which is used if a specific files is not selected
# Uncomment one of these to use a file from within the course templates directory
# rather than a centrally-stored file shared by all courses.
$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg";
#$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg";
#$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg";
################################################################################
# Settings for the admin course
################################################################################
# Provide a list of model courses which are not real courses, but from which
# the templates for a new course can be copied.
#$modelCoursesForCopy = [ "modelCourse", "anotherModelCourse", "aThirdOne" ];
################################################################################
# OpenProblemLibrary
################################################################################
# For configuration instructions, see:
# http://webwork.maa.org/wiki/Open_Problem_Library
# The directory containing the open problem library files. Set to "" if no problem
# library is installed.
# NationalProblemLibrary (NPL) has been renamed to OpenProblemLibrary (OPL)
# If the OPL files are not stored in the standard locations, then uncomment
# these lines and replace with the correct paths.
$problemLibrary{root} = "/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
$contribLibrary{root} = "/opt/webwork/libraries/webwork-open-problem-library/Contrib";
$problemLibrary{version} = "2.5";
# These flags control if statistics on opl problems are shown in the library
# browser. If you do not want to include local statistics uncomment this line.
#$problemLibrary{showLibraryLocalStats} = 0;
# To disable global statistics uncomment this line.
#$problemLibrary{showLibraryGlobalStats} = 0;
# Additional library buttons can be added to the Library Browser (SetMaker.pm)
# by adding the libraries you want to the following line. For each key=>value
# in the list, if a directory (or link to a directory) with name 'key' appears
# in the templates directory, then a button with name 'value' will be placed at
# the top of the problem browser. (No button will appear if there is no
# directory or link with the given name in the templates directory.) For
# example,
#
# $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
#
# would add two buttons, one for the Rochester library and one for the ASU
# library, provided templates/rochester and templates/asu exists either as
# subdirectories or links to other directories. The "NPL Directory" button
# activated below gives access to all the directories in the National
# Problem Library.
$courseFiles{problibs} = {
Library => "OPL Directory",
ubcLibrary => "UBC Library",
capaLibrary => "CAPA",
Contrib => "Contrib",
# the following are not really needed but you can
# create links to your own private libraries this way.
#rochesterLibrary => "Rochester",
#unionLibrary => "Union",
#asuLibrary => "Arizona State",
#dcdsLibrary => "Detroit CDS",
#dartmouthLibrary => "Dartmouth",
#indianaLibrary => "Indiana",
#osuLibrary => "Ohio State",
};
################################################################################
# Permission levels
################################################################################
# The default roles are defined in defaults.config. To change the list of available
# roles, copy the %userRoles hash from defaults.config into this file with the
# appropriate changes.
# User roles in order of increasing permissions. Each level has all of the privileges of
# the lower levels.
# guest
# student
# login_proctor
# grade_proctor
# ta
# professor
# admin
# The complete list of permissions is available in defaults.config. If you want
# to change the lowest role which has that permission, use the following syntax:
# $permissionLevels{login} = "guest";
# The above code would give the permission to login to any user with permission
# level guest or higher.
# By default answers for all users are logged to the past_answers table in the database
# and the myCourse/logs/answer_log file. If you only want answers logged for users below
# a certain permission level, then change this setting. e.g. by setting this to
# "professor", then answers would not be logged for anyone with permission level of
# "professor" or higher
$permissionLevels{dont_log_past_answers} = "professor";
$permissionLevels{record_set_version_answers_when_acting_as_student} = "professor";
$permissionLevels{record_answers_when_acting_as_student} = "ta";
### Custom UBC Settings ###
# Adding a "designer" role by request. Designers were previously mapped to
# "professor" and there were concerns that this is too much access. So it was
# suggested that we have a role that can create content but doesn't have
# grading power.
$userRoles{designer} = 4;
$permissionLevels{view_hidden_work} = "designer";
$permissionLevels{view_multiple_sets} = "designer";
$permissionLevels{view_unopened_sets} = "designer";
$permissionLevels{view_hidden_sets} = "designer";
$permissionLevels{view_answers} = "designer";
$permissionLevels{view_ip_restricted_sets} = "designer";
$permissionLevels{access_instructor_tools} = "designer";
$permissionLevels{view_problem_debugging_info} = "designer";
$permissionLevels{create_and_delete_problem_sets} = "designer";
$permissionLevels{modify_problem_sets} = "designer";
$permissionLevels{modify_set_def_files} = "designer";
$permissionLevels{manage_course_files} = "designer";
# required to create course by LTI launch, TAs & Designers sometimes need this
$permissionLevels{create_and_delete_courses} = "designer";
# designers sometimes need to assign problem sets (e.g. troubleshooting)
$permissionLevels{assign_problem_sets} = "designer";
# TAs are asked to do a lot of instructor tasks
$permissionLevels{modify_student_data} = "ta";
$permissionLevels{become_student} = "ta";
$permissionLevels{send_email} = "ta";
# Needed to allow instructors to submit on behalf of students
$permissionLevels{avoid_recording_answers} = "nobody";
# This sets who can change their local login password. Since we're CWL or LTI
# auth only, regular users should never need this. Only admins should be using
# local login.
$permissionLevels{change_password} = "admin";
# don't let students change their local email since it'll just get overridden
# by LTI syncs anyway, note that non-student changes should persist
$permissionLevels{change_email_address} = "designer";
################################################################################
# Default settings for the problem editor pages
################################################################################
# This sets if the PG editor should use a js based "codemirror" editor or
# just a textarea
#$options{PGCodeMirror} = 0;
# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
$options{PGMathView} = 1;
# This sets if WirisEditor is available on the PG editor for use as a minimal latex equation editor
#$options{PGWirisEditor}= 1;
# This sets if MathQuill is available on the PG editor for use as a minimal latex equation editor
$options{PGMathQuill}= 1;
################################################################################
# PG subsystem options
################################################################################
# List of enabled display modes. Comment out any modes you don't wish to make
# available for use.
# The first uncommented option is the default for instructors rendering problems
# in the homework sets editor.
#$pg{displayModes} = [
#"MathJax", # render TeX math expressions on the client side using MathJax
# we strongly recommend people install and use MathJax, and it is required if you want to use mathview
#"images", # display math expressions as images generated by dvipng
#"plainText", # display raw TeX for math expressions
#];
# Default display mode. Should be an uncommented item listed above.
#$pg{options}{displayMode} = "images";
################################################################################
# Adding to the macro file search path. (Check with entries in defaults.config before overriding)
################################################################################
# The list of directories searched by loadMacros() when it looks for a .pl file
# is defined in defaults.config.
# To add a directory to this list, use the following syntax:
#
# $pg{directories}{macrosPath} = [@{$pg{directories}{macrosPath}},"/path/to/new/location"];
#
# If your new directory is a subdirectory of the National Problem Library, you may use the prefix of
# $courseDirs{templates}/Library/ (such as "$courseDirs{templates}/Library/mymacrosdir")
# Note: This will look for macro files in your new location only after checking all of the locations
# already defined in defaults.config.
# You may reverse the order of the two arguments above AT YOUR OWN RISK, as this will check your
# new location even before the local directory of the problem, so your new location will take
# precedence over all other locations.
################################################################################
# Adding to the applet search path.
################################################################################
# If a full URL is given, it is used unmodified. If an
# absolute path is given, the URL of the local server is prepended to it.
#
# For example, if an item is "/math/applets",
# and the local server is "https://math.yourschool.edu",
# then the URL "https://math.yourschool.edu/math/applets" will be used.
#
# If your new applets location is a subdirectory of the webwork htdocs directory, you may
# use notation such as "$webworkURLs{htdocs}/newsubdir"
#$pg{directories}{appletPath} = [ @{$pg{directories}{appletPath}} , "new/url" ];
################################################################################
# Problem creation defaults
################################################################################
# The default weight (also called value) of a problem to use when using the
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.
$problemDefaults{value} = 1;
# The default max_attempts for a problem to use when using the
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file. Note that
# setting this to -1 gives students unlimited attempts.
$problemDefaults{max_attempts} = -1;
# The default showMeAnother for a problem to use when using the
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file. Note that
# setting this to -1 disables the showMeAnother button
$problemDefaults{showMeAnother} = -1;
# The default prPeriod value (re-randomization period) to use for the newly created problem.
# It is suggested to use the value of -1, which means that the course-wide setting would be used
# Setting this to -1 defaults to the use of course-wide settings (suggested)
# Setting this to 0 disables periodic randomization regardless of the course-wide setting
# Setting this to a positive value will override the course-wide setting
#$problemDefaults{prPeriod} = -1;
################################################################################
# Periodic re-randomization
################################################################################
# switch to enable periodic re-randomization
#$pg{options}{enablePeriodicRandomization} = 0;
# course-wide default period for re-randomization, should be an integer
# the value of 0 disables re-randomization
#$pg{options}{periodicRandomizationPeriod} = 5;
################################################################################
# "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
################################################################################
$pg{specialPGEnvironmentVars}{DragMath} = 0;
$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools/",
$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools/",
$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{templates}/Contrib/CAPA/CAPA_Graphics/",
push @{$pg{directories}{macrosPath}},
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools",
"$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools";
# The link Contrib in the course templates directory should point to ../webwork-open-problem-library/Contrib
# Determines whether or not MathObjects contexts will parse the alternative tokens
# listed in the "alternatives" property (mostly for unicode alternatives for parse tokens).
# $pg{specialPGEnvironmentVars}{parseAlternatives} = 1;
# Determines whether or not the MathObjects parser will convert the Full Width Unicode block
# (U+FF01 to U+FF5E) to their corresponding ASCII characters (U+0021 to U+007E) automatically.
# $pg{specialPGEnvironmentVars}{convertFullWidthCharacters} = 1;
# Application that the PGtikz.pl and PGlateximage.pl macros will use to create svg images.
# This should be either 'pdf2svg' or 'dvisvgm'. The default is 'pdf2svg'.
# If the system version of latex is 3.14159265-2.6-1.40.20 (TeX Live 2019) or newer
# and the system version of dvisvgm is 2.8.1 or newer, then change this to 'dvisvgm'
# by uncommenting the line below. 'dvisvgm' will generally create better 'svg'
# images.
#$pg{specialPGEnvironmentVars}{latexImageSVGMethod} = "dvisvgm";
# When ImageMagick is used for image conversions, this sets the default options.
# See https://imagemagick.org/script/convert.php for a full list of options.
# convert will be called as:
# convert <input options> file.ext1 <output options> file.ext2
#$pg{specialPGEnvironmentVars}{latexImageConvertOptions} = {input => {density => 72}, output => {quality => 92}};
###############################################################################
# Math entry assistance
###############################################################################
#$pg{specialPGEnvironmentVars}{entryAssist} = 'MathQuill';
$pg{specialPGEnvironmentVars}{entryAssist} = 'MathView';
#$pg{specialPGEnvironmentVars}{entryAssist} = 'WIRIS';
################################################################################
# Directory for temporary files
################################################################################
# Location of web-accessible temporary files, such as equation images.
# Default which is set in defaults.config:
#$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
#$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
# Alternate locations -- this allows you to place temporary files in a location
# that is not backed up and is the recommended set up for most installations.
# See http://webwork.maa.org/wiki/Store_WeBWorK%27s_temporary_files_in_a_separate_directory_or_partition
# for more information. Note that the wwtmp directory (or partition) should be
# created under Apache's main server document root which is usually /var/www. If this
# is in a different location on your system, edit the lines below accordingly.
# To implement, uncomment the following 6 lines:
#$webworkDirs{htdocs_temp} = '/var/www/wwtmp';
#$webworkURLs{htdocs_temp} = '/wwtmp';
#$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
#$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
#$courseDirs{html_temp} = "/var/www/wwtmp/$courseName";
#$courseURLs{html_temp} = "/wwtmp/$courseName";
#####################
# Additional PG modules
#####################
#push (@{${pg}{modules}}, [qw(LaTeXImage)]);
################################################################################
# Student Date Format
################################################################################
# Uncomment the following line to customize the format of the dates displayed to
# students. As it is written, the line below will display open, due and answer
# dates in the following format: Wed Jun 27 at 10:30am
# For all available options, consult the documentation for perl DateTime under
# "strftime patterns".
#$studentDateDisplayFormat="%a %b %d at %l:%M%P";
################################################################################
# Using R with WeBWorK
################################################################################
# To enable Rserve (the R statistical server) in WeBWorK, uncomment the
# following line. The R server needs to be installed and running in order for
# this to work. See http://webwork.maa.org/wiki/R_in_WeBWorK for more info.
#$pg{specialPGEnvironmentVars}{Rserve} = {host => "localhost"};
# use this setting when running Rserve in a docker container.
#$pg{specialPGEnvironmentVars}{Rserve} = {host => "r"};
################################################################################
# Serving Opaque client questions to moodle
################################################################################
# this snippet checks to see if Moodle has already called MathJax
# $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> <<END_PREAMBLE };
#
# <script type="text/x-mathjax-config">
# if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) {
# MathJax.Hub.Config({
# config: [],
# skipStartupTypeset: false
# });
# }
# </script>
# END_PREAMBLE
################################################################################
# Authentication Methods
################################################################################
# Extra modules have been created to allow WeBWorK to use certain external
# methods of authentication.
$authen{user_module} = {
"*" => "WeBWorK::Authen::Shibboleth",
};
################################################################################
# IMS LTI Authentication
################################################################################
# Uncomment the following line to enable authentication via IMS LTI.
# You will have to copy the file authen_LTI.conf.dist to authen_LTI.conf,
# and then edit that file to fill in the settings for your installation.
#include("conf/authen_LTI.conf");
# default settings
#$debug_lti_parameters = 0;
#$debug_lti_grade_passback = 0;
# Set debug_lti_parameters to 1 to have LTI calling parameters printed to HTML page for
# debugging. This is useful when setting things up for the first time because
# different LMS systems have different parameters
# To get more information on passing grades back to the LMS enmass set debug_lti_grade_passback
# to one. And set the LTIMassUpdateInterval to 60 (seconds).
# This will print into the apache log the success or failure of updating each user/set.
# If the set has "no lis_source_did" then that set hasn't been assigned, or the user is an instructor
# and not a student.
# Setting both debug_lti_parameters and debug_lti_grade_passback will cause the full request and
# response between the LMS and WW to be printed into apache error log file for each
# user/set update of the grade.
# The switches above can be set in course.conf to enable debugging for just one course.
# If you want even more information enable the debug facility for SubmitGrade.pm in
# the WeBWorK::Constants file.
# This will print extensive debug messages for all courses.
# ubc custom, some params from authen_LTI.conf.dist that are used by the
# ContentGenerator modules in error messages so needs to be defined
$LMS_name = 'Canvas';
$LMS_url = 'https://canvas.ubc.ca/';
################################################################################
# LDAP Authentication
################################################################################
# Uncomment the following line to enable authentication via an LDAP server.
# You will have to copy the file authen_ldap.conf.dist to authen_ldap.conf,
# and then edit that file to fill in the settings for your installation.
#include("conf/authen_ldap.conf");
################################################################################
# Session Management
################################################################################
## For a discussion of session_management_via session_cookies or the
## Key database, see the Session Management section
## of defaults.config.dist
## For session management using the key database table, uncomment the following line,
## which will override the setting $session_management_via = "session_cookie"
## set in defaults.config.
#$session_management_via = "key";
################################################################################
# Cookie control settings
################################################################################
# The following variables can be set to control cookie behavior.
# Set the value of the samesite attribute of the WeBWorK cookie:
# See: https://blog.chromium.org/2019/10/developers-get-ready-for-new.html
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
# https://tools.ietf.org/html/draft-west-cookie-incrementalism-00
# Notes about the $CookieSameSite options:
# The "None" setting should only be used with HTTPS and when $CookieSecure = 1; is set below. The "None" setting is also less secure and can allow certain types of cross-site attacks.
# The "Strict" setting can break the links in the system generated feedback emails when read in a web mail client.
# Due to those factors, the "Lax" setting is probably the optimal choice for typical WeBWorK servers.
#$CookieSameSite = "None";
#$CookieSameSite = "Strict";
#$CookieSameSite = "Lax";
# Set the value of the secure cookie attribute:
#$CookieSecure = 1;
# At present the CookieLifeTime setting only effect how long the
# browser is to supposed to retain the cookie.
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
#$CookieLifeTime = "+7d";
#$CookieLifeTime = "session";
# NOTE: In general the cookie lifespan settings use the CGI.pm relative time settings.
# Search for "30 seconds from now" at https://metacpan.org/pod/CGI to see the various options.
# A WW option is to set it to "session", in which case the Cookie will expire when the
# browser session ends (a "session cookie").
################################################################################
# Searching for set.def files to import
################################################################################
## Uncomment below so that when the homework sets editor searches for set def
## files, it searches beyond templates; it can search deeper subfolders of
## templates, and optionally also descend into Library
#$options{setDefSearchDepth}=4; #search down 4 levels
#$options{useOPLdefFiles}=1;
################################################################################
# Permission overrides (e.g. "admin", "professor", "ta", "student", "guest"
################################################################################
#$permissionLevels{show_resource_info} = "admin";
#$permissionLevels{show_pg_info_checkbox} = "admin";
#$permissionLevels{show_answer_hash_info_checkbox} = "admin";
#$permissionLevels{show_answer_group_info_checkbox} = "admin";
#$permissionLevels{modify_tags} = "admin";
################################################################################
# Available Hardcopy themes (located in snippets) - adds four XeLaTeX themes
# using polyglossia for multilingual support and fontspec.
# The "oneColumn" and "twoColumn" options require pdflatex be installed on the server
# For using any of the XeLaTeX options, xelatex must be installed on the server
# (on Ubuntu this is in the texlive-xetex package).
# Note: restrict options to only pdflatex options, or only xelatex options,
# and not both types.
# Set $externalPrograms{pdflatex} to use either pdflatex or xelatex,
# depending on which flavor of themes you are enabling.
# Using --no-shell-escape is important for security reasons.
#$externalPrograms{pdflatex} ="/usr/bin/xelatex --no-shell-escape";
# Available Hardcopy themes (located in snippets)
# (their "internal" name and their pretty name for end users)
#$hardcopyThemeNames = {
#oneColumn => 'One Column',
#twoColumn => 'Two Columns',
#XeLaTeX-oneColumn => 'English - one Column',
#XeLaTeX-twoColumn => 'English - two Columns',
#XeLaTeX-Hebrew-oneColumn => 'Hebrew/English - one Column',
#XeLaTeX-Hebrew-twoColumn => 'Hebrew/English - two Columns',
#};
# This is needed to enforce an order that the options are presented when making a hardcopy
#$hardcopyThemes = [
#'oneColumn',
#'twoColumn',
#'XeLaTeX-oneColumn',
#'XeLaTeX-twoColumn',
#'XeLaTeX-Hebrew-oneColumn',
#'XeLaTeX-Hebrew-twoColumn',
#];
# Change default Hardcopy theme
# Be sure to choose one that is enabled!
#$hardcopyTheme = "XeLaTeX-twoColumn";
# Location of the common tex input files packages.tex, CAPA.tex, and PGML.tex
# used for hardcopy generation. Uncomment the following line and adjust the
# path as needed to customize the TeX input files used for all themes in
# hardcopy generation. This location must contain the three files named above.
#$webworkDirs{texinputs_common} = "$webworkDirs{root}/conf/snippets/hardcopyThemes/common";
################################################################################
# Webwork Caliper
################################################################################
# enable/disable Caliper for install
$caliper{enabled} = 0;
# base_url should ideally be hard coded to a persistent url pointing to the webwork root
# (important to keep it consistent over time)
$caliper{base_url} = 'https://webwork.elearning.ubc.ca/webwork2/';
# LRS endpoint
$caliper{host} = 'http://caliper.example.host.org/api/endpoint';
# LRS endpoint Bearer API key
$caliper{api_key} = '1234567890abcdefg';
# log file for caliper errors
$caliper{errorlog} = $webworkDirs{logs} . "/caliper_errors.log";
# customized Caliper actor. Useful if persistent identifiers for students are available in WebWork
$caliper{custom_actor_generator} = sub {
my ($ce, $db, $user) = @_;
# set caliper id as needed
my $caliper_id = 'http://www.ubc.ca/' . $user->user_id();
my $otherIdentifiers = [];
# add lti user ids when available
# push @$otherIdentifiers, {
# 'identifier' => ,
# 'type' => 'SystemIdentifier',
# 'identifierType' => 'LtiUserId',
# };
return {
'id' => $caliper_id,
'type' => 'Person',
'name' => $user->first_name() . " " . $user->last_name(),
'otherIdentifiers' => $otherIdentifiers,
};
};
################################################################################
# Status System
################################################################################
# Modify the Proctor status to Professor status and allow course access.
# Users marked as "Enrolled" or "Teaching" can be modified during course
# enrolment sync, e.g.: they can be dropped.
#
# Users marked as "EnrolledNoDrop" or "TeachingNoDrop" are exempted from
# modification during course enrolment sync.
$statuses{Teaching} = {
abbrevs => [qw/ P p professor /],
behaviors => [qw/ allow_course_access include_in_assignment /],
};
$statuses{EnrolledNoDrop} = {
abbrevs => [qw/ E e enrollednodrop /],
behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /],
};
$statuses{TeachingNoDrop} = {
abbrevs => [qw/ T t teachingnodrop /],
behaviors => [qw/ allow_course_access include_in_assignment /],
};
# proctored gateway quizzes will create a proctor user used just for the
# proctor login authentication, so we need to leave it as a valid status
$statuses{Proctor}{abbrevs} = [qw/ G g gatewayproctor /];
# URL of WeBWorK Bugzilla database.
$webworkURLs{bugReporter} = "mailto:webwork.support\@ubc.ca";
# Add in custom authen modules
$authen{lti} = "WeBWorK::Authen::LTIAdvantage";
# xmlrpc webservice requests will use the default auth instead of shib
$authen{'xmlrpc'} = "WeBWorK::Authen";
################################################################################
# Delayed Job
################################################################################
$delayed_job{enabled} = 1;
################################################################################
# LTI Advantage
################################################################################
$lti_advantage{studentlog} = $webworkDirs{logs} . "/studentupdates.log";
# Set password for the admin user created for all imported courses.
$lti_advantage{adminuserpw} = "admin";
$lti_advantage{push_grades_on_submit} = 1;
$lti_advantage{hide_new_courses} = 1;
$lti_advantage{auto_assign_users_to_sets} = 1;
$lti_advantage{cron_grade_sync} = 1;
$lti_advantage{cron_roster_sync} = 1;
$lti_advantage{lti_clients} = {
'example_client_id' => {
# will look inside of nested object if `|` is used as seperator. Doing this allow using fields inside of claims
# set to $Canvas.user.sisIntegrationId in canvas
user_identifier_field => "https://purl.imsglobal.org/spec/lti/claim/custom|ubc_puid",
# set to $Canvas.user.sisSourceId in canvas
user_student_number_field => "https://purl.imsglobal.org/spec/lti/claim/custom|student_number",
platform_id => "example_platform_id",
oauth2_access_token_url => "https://example.com/access_tokens",
oidc_auth_url => "https://example.com/authorizations/new",
platform_security_jwks_url => "https://example.com/security/jwks.json",
tool_public_key => "",
tool_private_key => "",
}
};
$lti_advantage{lti_clients}{'example_client_id'}{tool_public_key} = <<'EOF';
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6sJx68cYViPEty86G2KB
nWh62Aoc99zguv69ni4y+augier+1IArQ5apF8j657zbk/EYUf3kRka1fGmALvQY
...
6QYC0Fq4UQqgaioRSZAUylMdhmPZHcmD0ZspfT0qTmPBGD1NsVL5Ez1tbKyJKmCA
lQIDAQAB
-----END PUBLIC KEY-----
EOF
$lti_advantage{lti_clients}{'example_client_id'}{tool_private_key} = <<'EOF';
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA6sJx68cYViPEty86G2KBnWh62Aoc99zguv69ni4y+augier+
1IArQ5apF8j657zbk/EYUf3kRka1fGmALvQYZ+MWjjomR64u7rofgdetgnfIOQQa
XD4q6FRjJr6ljIZg8ZjdBmkF4dmSMjz51lIKfcwKPRCEKeA8h92XUeZh4EK7RCcg
...
wqw0N02hAoGAbpjOnPTul04AerLoehExqsBxTw255n/k70kWizKITmuPKFLwECKV
7M6OVj6qd2EduHxBP39YtM4pJaL+uRFzhNfz1vBFCebe77V7rWliSLEKxL9JC2JZ
/t74QYubrfWuiLLFeKDyLBu/Wx9kkKwo87U+o1P3/xZEqWzDlZ4wrb0=
-----END RSA PRIVATE KEY-----
EOF
# Note that the mapped Webwork course name still goes through sanitization.
# Please make sure they match these requirements or the courses will not match.
# - Allowed characters in regex form: [a-zA-Z0-9_-]
# - Max length 40 characters
# See LTIAdvantage::Parser::LaunchParser() for implementation
$lti_advantage{custom_course_title_parser} = sub {
my $parser = shift;
# else use term name (if available) and context_label
my $course_title = $parser->get_claim_param("context", "label");
my $term_name = $parser->get_claim_param("custom", "term_name");
if (defined($term_name) && $term_name ne "" && $term_name ne "Canvas.term.name" && $term_name ne "Default Term") {
# do term then context title in order to reduce change of collision if context title is very long
$course_title = $term_name . "_" . $course_title;
}
return $course_title;
};
$lti_advantage{course_template} = "modelCourse";
################################################################################
# Shibboleth
################################################################################
$shibboleth{login_script} = "/Shibboleth.sso/Login";
$shibboleth{logout_script} = "/Shibboleth.sso/Logout?return=".$server_root_url.$webwork_url;
$shibboleth{session_header} = "Shib-Session-ID"; # the header to identify if there is an existing shibboleth session
$shibboleth{manage_session_timeout} = 0; #allow shib to manage session time instead of webwork
$shibboleth{hash_user_id_method} = "none"; # possible values none, MD5. Use it when you want to hide real user_ids from showing in url.
$shibboleth{hash_user_id_salt} = ""; # salt for hash function
#define mapping between shib and webwork
$shibboleth{attributes} = [
'puid',
'studentNumber',
'employeeNumber',
'cwlLoginName',
];
################################################################################
# R Integration
################################################################################
push @{$pg{modules}},
[qw( Statistics::R::IO::Rserve )],
[qw( Statistics::R::IO::ParserState )],
[qw( Statistics::R::REXP::Character )],
[qw( Statistics::R::REXP::Double )],
[qw( Statistics::R::REXP::Environment )],
[qw( Statistics::R::REXP::GlobalEnvironment )],
[qw( Statistics::R::REXP::Integer )],
[qw( Statistics::R::REXP::Language )],
[qw( Statistics::R::REXP::List )],
[qw( Statistics::R::REXP::Logical )],
[qw( Statistics::R::REXP::Null )],
[qw( Statistics::R::REXP::Raw )],
[qw( Statistics::R::REXP::Symbol )],
[qw( Statistics::R::REXP::Unknown )],
[qw( Statistics::R::REXP::Vector )],
[qw( Statistics::R::REXP )],
[qw( Math::Complex )],
[qw( IO::File )],
[qw( IO::Handle )],
[qw( Moose )],
[qw( Class::MOP )];
$pg{specialPGEnvironmentVars}{Rserve} = {host => $ENV{"R_HOST"}};
# By default, only require proctor password when starting proctored quiz
$options{proctorOnlyNeededWhenStarting} = 1;
1; #final line of the file to reassure perl that it was read properly.