forked from xcompass/webwork2
/
defaults.config
2201 lines (1917 loc) · 97.7 KB
/
defaults.config
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
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!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 is used to set up the default WeBWorK course environment for all
# requests. Values may be overwritten by the course.conf for a specific course.
# All package variables set in this file are added to the course environment.
# If you wish to set a variable here but omit it from the course environment,
# use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache
# configuration file (webwork.apache-config) and is available for use here. In
# addition, the $courseName variable holds the name of the current course.
# YOU SHOULD NOT NEED TO EDIT THIS FILE!!
# All site-specific settings such as file locations and web addresses are
# configured in site.conf. If you want to override any settings in this
# file, you can put a directive in localOverrides.conf.
include("conf/site.conf");
include("VERSION"); # get WW version
# The version of PG is now obtained from the file pg/VERSION
# using code added to CourseEnvironment.pm
# with this one exception include can only read files under the webwork2 directory
################################################################################
# site.conf should contain basic information about directories and URLs on
# your server
################################################################################
################################################################################
# Mail Settings
################################################################################
# AllowedRecipients defines addresses that the PG system is allowed to send mail
# to. this prevents subtle PG exploits. This should be set in course.conf to the
# addresses of professors of each course. Sending mail from the PG system (i.e.
# questionaires, essay questions) will fail if this is not set somewhere (either
# here or in course.conf).
$mail{allowedRecipients} = [
#'prof1@yourserver.yourdomain.edu',
#'prof2@yourserver.yourdomain.edu',
];
# By default, feedback is sent to all users who have permission to
# receive_feedback. If this list is non-empty, feedback is also sent to the
# addresses specified here.
#
# * If you want to disable feedback altogether, leave this empty and set
# submit_feedback => $nobody in %permissionLevels below. This will cause the
# feedback button to go away as well.
#
# * If you want to send email ONLY to addresses in this list, set
# receive_feedback => $nobody in %permissionLevels below.
#
# It's often useful to set this in the course.conf to change the behavior of
# feedback for a specific course.
#
# Items in this list may be bare addresses, or RFC822 mailboxes, like:
# 'Joe User <joe.user@example.com>'
# The advantage of this form is that the resulting email will include the name
# of the recipient in the "To" field of the email.
#
$mail{feedbackRecipients} = [
#'prof1@yourserver.yourdomain.edu',
#'prof2@yourserver.yourdomain.edu',
];
# Feedback subject line -- the following escape sequences are recognized:
#
# %c = course ID
# %u = user ID
# %s = set ID
# %p = problem ID
# %x = section
# %r = recitation
# %% = literal percent sign
#
$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";
# feedbackVerbosity:
# 0: send only the feedback comment and context link
# 1: as in 0, plus user, set, problem, and PG data
# 2: as in 1, plus the problem environment (debugging data)
$mail{feedbackVerbosity} = 1;
# Should the studentID be included in the feedback email when feedbackVerbosity > 0:
# The default is yes
$blockStudentIDinFeedback = 0;
# Defines the size of the Mail Merge editor window
# FIXME: should this be here? it's UI, not mail
# FIXME: replace this with the auto-size method that TWiki uses
$mail{editor_window_rows} = 15;
$mail{editor_window_columns} = 100;
##################################################################################
# Customizing the action of the "Email your instructor" button
##################################################################################
# Customizing the behavior for this button is best done by copying the lines below, entering them
# in the localOverrides.conf file and making the desired modifications.
# Then you will not need to update these modifications
# when you download a new version of WeBWorK.
# Use this to customize the text of the feedback button.
$feedback_button_name = "Email Instructor";
# If this value is true, feedback will only be sent to users with the same
# section as the user initiating the feedback.
$feedback_by_section = 0;
# If the variable below is set to a non-empty value (i.e. in course.conf), WeBWorK's usual
# email feedback mechanism will be replaced with a link to the given URL.
# See also $feedback_button_name, above.
$courseURLs{feedbackURL} = "";
# If the variable below is set to a non-empty value (i.e. in course.conf),
# WeBWorK's usual email feedback mechanism will be replaced with a link to the given URL and
# a POST request with information about the problem including the HTML rendering
# of the problem will be sent to that URL.
# See also $feedback_button_name, above.
#$courseURLs{feedbackFormURL} = "http://www.mathnerds.com/MathNerds/mmn/SDS/askQuestion.aspx"; #"http://www.tipjar.com/cgi-bin/test";
$courseURLs{feedbackFormURL} = "";
################################################################################
# Repository Information
################################################################################
# This is where you put your remote and branch for your WeBWorK, PG and OPL
# github repositories.
# Note: This process uses git ls-remote which can be very slow on some
# systems. If your course list page in the admin course is very slow
# consider disabling this option.
$enableGitUpgradeNotifier = 0;
$gitWeBWorKRemoteName = "origin";
$gitWeBWorKBranchName = "main";
$gitPGRemoteName = "origin";
$gitPGBranchName = "main";
$gitLibraryRemoteName = "origin";
$gitLibraryBranchName = "main";
################################################################################
# Theme
################################################################################
$defaultTheme = "math4";
$defaultThemeTemplate = "system";
# The institution logo should be an image file in the theme's images folder
$institutionLogo = 'maa_logo.png';
$institutionURL = 'http://www.maa.org';
$institutionName = 'MAA (Mathematical Association of America)';
################################################################################
# Hardcopy Theme
################################################################################
# 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',
];
# Default Hardcopy theme
$hardcopyTheme = "twoColumn";
################################################################################
# Achievements
################################################################################
$achievementsEnabled = 0;
$achievementItemsEnabled = 0;
$achievementPointsPerProblem = 5;
$achievementPreambleFile = "preamble.at";
################################################################################
# Achievements
################################################################################
$showCourseHomeworkTotals = 1;
################################################################################
# Editor
################################################################################
$editor{author} = '';
$editor{authorInstitute} = '';
$editor{textTitle} = '';
$editor{textEdition} = '';
$editor{textAuthor} = '';
################################################################################
# showMeAnother
################################################################################
# switch to enable showMeAnother button
$pg{options}{enableShowMeAnother} = 0;
# default number of attempts before enabling show me another
$pg{options}{showMeAnotherDefault} = -1;
# maximum number of times (per problem) the button can be used
$pg{options}{showMeAnotherMaxReps} = 3;
# maximum number of attempts to check if changing the problem seed
# changes the problem
$pg{options}{showMeAnotherGeneratesDifferentProblem} = 5;
# showMeAnother options
$pg{options}{showMeAnother}=[
"SMAcheckAnswers",
"SMAshowSolutions",
"SMAshowCorrect",
"SMAshowHints",
];
###############################################################################
# periodicRandomization
################################################################################
# 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;
# Show the correct answer after a student's last attempt at the current version
# and before a new version is requested.
$pg{options}{showCorrectOnRandomize} = 0;
################################################################################
# Waive Explanations
################################################################################
# switch to remove explanation essay block from questions that have one
$pg{specialPGEnvironmentVars}{waiveExplanations} = 0;
################################################################################
# Language
################################################################################
$language = "en"; # tr = turkish, en=english
# $perProblemLangAndDirSettingMode controls how and whether LANG and/or DIR
# attributes are added to the DIV element enveloping a problem
# which helps handle proper display of problems with a text direction
# different from that used course-wide. Ex: enables English problems to
# be displayed properly in a Hebrew course site, which helps select problems
# to be translated to Hebrew.
$perProblemLangAndDirSettingMode = "force::ltr";
################################################################################
# System-wide locations (directories and URLs)
################################################################################
# The root directory, set by webwork_root variable in Apache configuration.
$webworkDirs{root} = "$webwork_dir";
# Location of system-wide data files.
$webworkDirs{DATA} = "$webworkDirs{root}/DATA";
# Used for temporary storage of uploaded files.
$webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads";
# Location of utility programs.
$webworkDirs{bin} = "$webworkDirs{root}/bin";
# Location of configuration files, templates, snippets, etc.
$webworkDirs{conf} = "$webworkDirs{root}/conf";
# Location of course directories.
$webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
# Contains log files.
$webworkDirs{logs} = "$webworkDirs{root}/logs";
# Contains non-web-accessible temporary files, such as TeX working directories.
$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
# The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
# (any subdirectory of these is a valid target for a symbolic link.)
# For example:
# $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
$webworkDirs{valid_symlinks} = [];
# Location of the common tex input files packages.tex, CAPA.tex, and PGML.tex
# used for hardcopy generation.
$webworkDirs{texinputs_common} = "$webworkDirs{root}/conf/snippets/hardcopyThemes/common";
################################################################################
##### The following locations are web-accessible.
################################################################################
# The root URL (usually /webwork2), set by <Location> in Apache configuration.
$webworkURLs{root} = "$webwork_url";
# Location of system-wide web-accessible files, such as equation images, and
# help files.
$webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
$webworkURLs{htdocs} = "$webwork_htdocs_url";
# Location of web-accessible temporary files, such as equation images.
# These two should be set in localOverrides.conf -- not here since this can be overwritten by new versions.
$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
# Location of cached equation images.
$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
# Contains context-sensitive help files.
$webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles";
$webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles";
# Location of theme templates.
$webworkDirs{themes} = "$webworkDirs{htdocs}/themes";
# Location of localization directory.
$webworkDirs{localize} = "$webworkDirs{root}/lib/WeBWorK/Localize";
# URL of general WeBWorK documentation.
$webworkURLs{docs} = "https://webwork.maa.org";
# URL of WeBWorK Bugzilla database.
$webworkURLs{bugReporter} = "https://bugs.webwork.maa.org/enter_bug.cgi";
# URL of WeBWorK on GitHub
$webworkURLs{GitHub} = "https://github.com/openwebwork";
# Registration form URL, security signup mail address
$webworkURLs{serverRegForm} = "https://forms.gle/vrqpKiRHritnQNf37";
$webworkURLs{wwSecurityAnnounce} = "https://groups.google.com/g/ww-security-announce";
$webworkSecListManagers = 'ww-security-announce+managers@googlegroups.com';
# URLs in the Wiki
$webworkURLs{WikiMain} = "https://webwork.maa.org/wiki/";
$webworkURLs{SiteMap} = "https://webwork.maa.org/wiki/WeBWorK_Sites";
#URL for help buttons on the PGProblemEditor pages:
$webworkURLs{problemTechniquesHelpURL}='https://webwork.maa.org/wiki/Category:Problem_Techniques';
$webworkURLs{MathObjectsHelpURL} ='https://webwork.maa.org/wiki/Category:MathObjects';
$webworkURLs{PODHelpURL} ='https://webwork.maa.org/pod/';
$webworkURLs{PGLabHelpURL} ='https://demo.webwork.rochester.edu/webwork2/wikiExamples/MathObjectsLabs2/2?login_practice_user=true';
$webworkURLs{PGMLHelpURL} ='https://demo.webwork.rochester.edu/webwork2/cervone_course/PGML/1?login_practice_user=true';
$webworkURLs{AuthorHelpURL} ='https://webwork.maa.org/wiki/Category:Authors';
# Location of CSS
# $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/${defaultTheme}.css";
# this is never used -- changing the theme from the config panel
# doesn't appear to reset the theme in time?
# It's better to refer directly to the .css file in the system.template
# <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/>
################################################################################
# Defaults for course-specific locations (directories and URLs)
################################################################################
# The root directory of the current course. (The ID of the current course is
# available in $courseName.)
$courseDirs{root} = "$webworkDirs{courses}/$courseName";
# Location of course-specific data files.
$courseDirs{DATA} = "$courseDirs{root}/DATA";
# Location of course HTML files, passed to PG.
$courseDirs{html} = "$courseDirs{root}/html";
$courseURLs{html} = "$webwork_courses_url/$courseName";
# Location of course image files, passed to PG.
$courseDirs{html_images} = "$courseDirs{html}/images";
# Location of web-accessible, course-specific temporary files, like static and
# dynamically-generated PG graphics.
$courseDirs{html_temp} = "$webworkDirs{htdocs_temp}/$courseName";
$courseURLs{html_temp} = "$webworkURLs{htdocs_temp}/$courseName";
# Location of course-specific logs, like the transaction log.
$courseDirs{logs} = "$courseDirs{root}/logs";
# Location of scoring files.
$courseDirs{scoring} = "$courseDirs{root}/scoring";
# Location of PG templates and set definition files.
$courseDirs{templates} = "$courseDirs{root}/templates";
# Location of course achievement files.
$courseDirs{achievements} = "$courseDirs{templates}/achievements";
$courseDirs{achievements_html} = "$courseDirs{html}/achievements"; #contains badge icons
$courseURLs{achievements} = "$courseURLs{html}/achievements";
# Location of course-specific macro files.
$courseDirs{macros} = "$courseDirs{templates}/macros";
# Location of mail-merge templates.
$courseDirs{email} = "$courseDirs{templates}/email";
# Location of temporary editing files.
$courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit";
# mail merge status directory
$courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge";
################################################################################
# System-wide files
################################################################################
# Location of this file.
$webworkFiles{environment} = "$webworkDirs{conf}/defaults.conf";
# Flat-file database used to protect against MD5 hash collisions. TeX equations
# are hashed to determine the name of the image file. There is a tiny chance of
# a collision between two TeX strings. This file allows for that. However, this
# is slow, so most people chose not to worry about it. Set this to "" if you
# don't want to use the equation cache file.
$webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache";
################################################################################
# Hardcopy snippets are used in constructing a TeX file for hardcopy output.
# They should contain TeX code unless otherwise noted.
################################################################################
# The setHeader precedes each set in hardcopy output. It is a PG file.
# This is the default file which is used if a specific files is not selected
$webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg";
################################################################################
# In general the following files are determined by which hardcopy theme you
# are using however you can set these variables to override the theme settings.
# Note: These overrides are perminant across all themes.
################################################################################
# The preamble is the first thing in the TeX file.
#$webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
# The problem divider goes between problems.
#$webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
# The set footer goes after each set. Is is a PG file.
#$webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";
# The set divider goes between sets (in multiset output).
#$webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";
# The user divider does between users (in multiuser output).
#$webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";
# The postamble is the last thing in the TeX file.
#$webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
################################################################################
##### Screen snippets are used when displaying problem sets on the screen.
################################################################################
# The set header is displayed on the problem set page. It is a PG file.
# This is the default file which is used if a specific files is not selected
$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg";
# A PG template for creation of new problems.
$webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem2.pg"; # screenSetHeader.pg"
# A site info "message of the day" file
$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
################################################################################
# Course-specific files
################################################################################
# The course configuration file.
$courseFiles{environment} = "$courseDirs{root}/course.conf";
# The course simple configuration file (holds web-based configuration).
$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";
# File contents are displayed after login, on the problem sets page. Path given
# here is relative to the templates directory.
$courseFiles{course_info} = "course_info.txt";
# File contents are displayed on the login page. Path given here is relative to
# the templates directory.
$courseFiles{login_info} = "login_info.txt";
# These course specific files cannot be edited from the File Manager for safety reasons except
# by an administrator. These are paths relative to the course directory.
$uneditableCourseFiles = [
'simple.conf',
'course.conf',
];
# 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 "OPL Directory" button
# activated below gives access to all the directories in the National
# Problem Library.
#
$courseFiles{problibs} = {
Library => "OPL Directory",
Contrib => "Contrib", # remember to create link from Contrib to Contrib
# library directory
capaLibrary => "CAPA", # remember to create link from capaLibrary to CAPA
# in contrib
};
################################################################################
# Status system
################################################################################
# This is the default status given to new students and students with invalid
# or missing statuses.
$default_status = "Enrolled";
# The first abbreviation in the abbreviations list is the canonical
# abbreviation, and will be used when setting the status value in a user record
# or an exported classlist file.
#
# Results are undefined if more than one status has the same abbreviation.
#
# The four behaviors that are controlled by status are:
# allow_course_access => is this user allowed to log in?
# include_in_assignment => is this user included when assigning as set to "all" users?
# include_in_stats => is this user included in statistical reports?
# include_in_email => is this user included in emails sent to the class?
# include_in_scoring => is this user included in score reports?
%statuses = (
Enrolled => {
abbrevs => [qw/ C c current enrolled /],
behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /],
},
Audit => {
abbrevs => [qw/ A a audit /],
behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /],
},
Drop => {
abbrevs => [qw/ D d drop withdraw /],
behaviors => [qw/ /],
},
Proctor => {
abbrevs => [qw/ P p proctor /],
behaviors => [qw/ /],
},
);
################################################################################
# Database options
################################################################################
# Database schemas are defined in the file conf/database.conf and stored in the
# hash %dbLayouts. The standard schema is called "sql_single";
include( "./conf/database.conf.dist"); # always include database.conf.dist
# in the rare case where you want local overrides
# you can place include("conf/database.conf") in
# the database.conf.dist file
# this change is meant to help alleviate the common mistake of forgetting to update the
# database.conf file when changing WW versions.
# Select the default database layout. This can be overridden in the course.conf
# file of a particular course. The only database layout supported in WW 2.1.4
# and up is "sql_single".
$dbLayoutName = "sql_single";
# This sets the symbol "dbLayout" as an alias for the selected database layout.
*dbLayout = $dbLayouts{$dbLayoutName};
# This sets the max course id length. It might need to be changed depending
# on what database tables are present. Mysql allows a max table length of 64
# characters. With the ${course_id}_global_user_achievement table that means
# the max ${course_id} is exactly 40 characters.
$maxCourseIdLength = 40;
# Reference: https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html
################################################################################
# Problem library options
################################################################################
#
# The problemLibrary configuration data should now be set in localOverrides.conf
# For configuration instructions, see:
# https://webwork.maa.org/wiki/Open_Problem_Library
# The directory containing the open problem library files.
# Set the root to "" if no problem
#RE-CONFIGURE problemLibrary values in localOverrides.conf
# if these defaults are not correct.
#################################################
$problemLibrary{root} = "/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
$contribLibrary{root} = "/opt/webwork/libraries/webwork-open-problem-library/Contrib";
$problemLibrary{version} = "2.5";
###########################################################
# Problem Library SQL database connection information
$problemLibrary_db = {
dbsource => $database_dsn,
user => $database_username,
passwd => $database_password,
storage_engine => 'MYISAM',
};
$problemLibrary{tree} = 'library-directory-tree.json';
# These flags control if statistics on opl problems are shown in the library
# browser. If you want to include local statistics you will need to
# run webwork2/bin/update-OPL-statistics on a regular basis.
$problemLibrary{showLibraryLocalStats} = 1;
# This flag controls whether global statistics will be displayed
$problemLibrary{showLibraryGlobalStats} = 1;
################################################################################
# Logs
################################################################################
# Logs data about how long it takes to process problems. (Do not confuse this
# with the /other/ timing log which can be set by WeBWorK::Timing and is used
# for benchmarking system performance in general. At some point, this timing
# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
$webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log";
# Logs data about how long it takes to process problems. (Do not confuse this
# with the /other/ timing log which can be set by WeBWorK::Timing and is used
# for benchmarking system performance in general. At some point, this timing
# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
$webworkFiles{logs}{render_timing} = "$webworkDirs{logs}/render_timing.log";
# Logs courses created via the web-based Course Administration module.
$webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log";
# The transaction log contains data from each recorded answer submission. This
# is useful if the database becomes corrupted.
$webworkFiles{logs}{transaction} = "$webworkDirs{logs}/${courseName}_transaction.log";
# Logs for batch grading activities
$webworkFiles{logs}{batch_grading} = "$webworkDirs{logs}/${courseName}_batch_grading.log";
# The answer log stores a history of all users' submitted answers.
$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer.log";
# Log logins.
$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
# Log for almost every click. By default it is the empty string, which
# turns this log off. If you want it turned on, we suggest
# "$courseDirs{logs}/activity.log"
# When turned on, this log can get quite large.
$courseFiles{logs}{activity_log} = '';
################################################################################
# Site defaults (Usually overridden in localOverrides.conf)
################################################################################
# The default_templates_course is used by default to create a new course.
# The contents of the templates directory are copied from this course
# to the new course being created.
$siteDefaults{default_templates_course} ="modelCourse";
# 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" ];
################################################################################
# Authentication system
################################################################################
# FIXME This mechanism is a little awkward and probably should be merged with
# the dblayout selection system somehow.
# Select the authentication module to use for normal logins.
#
# If this value is a string, the given authentication module will be used
# regardless of the database layout. If it is a hash, the database layout name
# will be looked up in the hash and the resulting value will be used as the
# authentication module. The special hash key "*" is used if no entry for the
# current database layout is found.
# If this value is a sequence of strings or hashes, then each
# string or hash in the sequence will be successively tested to see if it
# provides a module that can handle
# the authentication request (by calling the module's
# sub request_has_data_for_this_verification_module ).
# The first module that responds affirmatively will be used.
#
#
$authen{user_module} = {
# sql_moodle => "WeBWorK::Authen::Moodle",
# sql_ldap => "WeBWorK::Authen::LDAP",
"*" => "WeBWorK::Authen::Basic_TheLastOption",
};
# Select the authentication module to use for proctor logins.
#
# A string or a hash is accepted, as above.
#
$authen{proctor_module} = "WeBWorK::Authen::Proctor";
$authen{xmlrpc_module} = "WeBWorK::Authen::XMLRPC";
################################################################################
# Authorization system (Make local overrides in localOverrides.conf )
################################################################################
# this section lets you define which groups of users can perform which actions.
# this hash maps a numeric permission level to the name of a role. the number
# assigned to a role is significant -- roles with higher numbers are considered
# "more privileged", and are included when that role is listed for a privilege
# below.
#
%userRoles = (
guest => -5,
student => 0,
login_proctor => 2,
grade_proctor => 3,
ta => 5,
professor => 10,
admin => 20,
nobody => 99999999, # insure that nobody comes at the end
);
# this hash maps operations to the roles that are allowed to perform those
# operations. the role listed and any role with a higher permission level (in
# the %userRoles hash) will be allowed to perform the operation. If the role
# is undefined, no users will be allowed to perform the operation.
#
%permissionLevels = (
login => "guest",
navigation_allowed => "guest",
report_bugs => "ta",
submit_feedback => "student",
change_password => "student",
change_email_address => "student",
change_pg_display_settings => "student",
proctor_quiz_login => "login_proctor",
proctor_quiz_grade => "grade_proctor",
view_proctored_tests => "student",
view_hidden_work => "ta",
view_multiple_sets => "ta",
view_unopened_sets => "ta",
view_hidden_sets => "ta",
view_answers => "ta",
view_ip_restricted_sets => "ta",
become_student => "professor",
access_instructor_tools => "ta",
score_sets => "professor",
send_mail => "professor",
receive_feedback => "ta",
create_and_delete_problem_sets => "professor",
assign_problem_sets => "professor",
modify_problem_sets => "professor",
modify_student_data => "professor",
modify_classlist_files => "professor",
modify_set_def_files => "professor",
modify_scoring_files => "professor",
modify_problem_template_files => "professor",
manage_course_files => "professor",
edit_achievements => "professor",
create_and_delete_courses => "professor",
fix_course_databases => "professor",
modify_tags => "admin",
edit_restricted_files => "admin",
##### Behavior of the interactive problem processor #####
show_resource_info => "admin",
show_correct_answers_before_answer_date => "ta",
show_solutions_before_answer_date => "ta",
avoid_recording_answers => "nobody", # record the grade/status/state of everyone's entries.
# Setting this to "ta" would record grade/status/state
# for students but not TA's or professors;
# TA's and above could avoid having their answers recorded.
# controls if old answers can be shown
can_show_old_answers => "student",
check_answers_before_open_date => "ta",
check_answers_after_open_date_with_attempts => "guest",
check_answers_after_open_date_without_attempts => "guest",
check_answers_after_due_date => "guest",
check_answers_after_answer_date => "guest",
can_check_and_submit_answers => "ta",
can_use_show_me_another_early => "ta",
create_new_set_version_when_acting_as_student => undef,
print_path_to_problem => "professor", # see "Special" PG environment variables
always_show_hint => "professor", # see "Special" PG environment variables
always_show_solution => "professor", # see "Special" PG environment variables
record_set_version_answers_when_acting_as_student => undef,
record_answers_when_acting_as_student => undef,
# "record_answers_when_acting_as_student" takes precedence
# over the following for professors acting as students:
record_answers_before_open_date => undef,
record_answers_after_open_date_with_attempts => "student",
record_answers_after_open_date_without_attempts => undef,
record_answers_after_due_date => undef,
record_answers_after_answer_date => undef,
dont_log_past_answers => undef,
# controls logging of the responses to a question
# in the past answer data base
# and in the myCourse/logs/answer_log file.
# Activities of users with this permission enabled are not entered
# in these logs. This might be used when collecting student data
# to avoid contaminating the data with TA and instructor activities.
# The professor setting means that professor's answers are not logged or
# saved in the past answer database.
view_problem_debugging_info => "ta",
show_pg_info_checkbox => "admin",
show_answer_hash_info_checkbox => "admin",
show_answer_group_info_checkbox => "admin",
##### Behavior of the Hardcopy Processor #####
download_hardcopy_multiuser => "ta",
download_hardcopy_multiset => "ta",
download_hardcopy_view_errors =>"professor",
download_hardcopy_format_pdf => "guest",
download_hardcopy_format_tex => "ta",
download_hardcopy_change_theme=> "ta",
);
# This is the default permission level given to new students and students with
# invalid or missing permission levels.
$default_permission_level = $userRoles{student};
################################################################################
# Session options
################################################################################
# $sessionKeyTimeout defines seconds of inactivity before a key expires
$sessionKeyTimeout = 60*60;
# $sessionKeyLength defines the length (in characters) of the session key
$sessionKeyLength = 32;
# @sessionKeyChars lists the legal session key characters
@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9');
# Practice users are users who's names start with $practiceUser
# (you can comment this out to remove practice user support)
$practiceUserPrefix = "practice";
# There is a practice user who can be logged in multiple times. He's
# commented out by default, though, so you don't hurt yourself. It is
# kindof a backdoor to the practice user system, since he doesn't have a
# password. Come to think of it, why do we even have this?!
#$debugPracticeUser = "practice666";
# Option for gateway tests; $gatewayGracePeriod is the time in seconds
# after the official due date during which we'll still grade the test
$gatewayGracePeriod = 120;
################################################################################
# Session Management
################################################################################
## Session management, i.e., checking whether the session has timed out,
## can be handled either using the key database, the traditional method,
## or by using session cookies. If one is using the key database
## for session_management and is using WeBWorK's password authentication,
## then one has the option of keeping a Login cookie with a duration
## of up to 30 days. However, if one uses cookies for session management,
## then one cannot also use Login cookies. So session management using
## cookies is more appropriate when external authentication systems
## are used, e.g., LDAP, LTIBasic, etc.
##
## The following ability to update the cookie timestamp instead of the timestamp in the database
## has been disabled for now. It opens a potential security hole.
## Setting $session_management_via="session_cookies" sets a session cookie automatically
## even if you don't ask for it explicitly and this login cookie contains a session_key which
## allows you to reenter your course (within 20 minutes or so) even if you move away from the
## webwork HTML page and loose the session_key embedded in the HTML page.
## However the time stamp in the cookie is not used currently used for anything.
##
#### NOT CURRENT: The reason one might want to use cookies for session management
#### is to avoid having to obtain a write lock on the Key database
#### every time a request is received in order to update the timestamp
#### in the Key database. When cookies are used for session management,
#### one obtains a write lock on the Key database for the original
#### login request in order to write the new session key and its initial
#### timestamp to the Key database, but on subsequent requests,
#### one merely obtains a read lock on the Key database in order
#### to verify that the session key in the session cookie is the
#### same as the session key in the Key database. The session timestamp
#### is maintained in the cookie, not in the Key database, which will
#### only show the timestamp of the original login.
## For session management using session_cookies, uncomment the first of the
## following lines.
## For session management using keys stored
## in the key database and, possibly, enduring cookies if any have been set,
## uncomment the second line.
## These choices can be overridden locally in the localOverrides.conf file.
## The default is to use "session_cookie".
$session_management_via = "session_cookie";
#$session_management_via = "key";
################################################################################
# WeBWorK Caliper
################################################################################
# Caliper is disabled by default. See localOverrides.conf.dist for configuration
# options when enabling Caliper.
$caliper{enabled} = 0;
################################################################################
# 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 = "Lax";
# Set the value of the secure cookie attribute:
$CookieSecure = 0; # Default is 0 here, as 1 will not work without https
# 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";
# 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").
################################################################################
# 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 settings for homework editor pages
##########################################################################################
# Whether the homework editor pages should show options for conditional release
$options{enableConditionalRelease} = 0;
# In the hmwk sets editor, how deep to search within templates for .def files.
# Note that this does not apply to the Library and Contrib directories.
# Those directories are not searched in any case (see below).
# 0 means only within templates.
$options{setDefSearchDepth} = 4;
# In the hmwk sets editor, also list OPL or Contrib set defintion files. Note
# that the directories are not searched, but these lists are loaded from the