#!perl

# 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
# should not be changed.
#
# 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
################################################################################

# $generic_sender_name will be used as the "From:" name on all feedback emails
# sent without a defined user.

$generic_sender_name = '';

# The following variables will override the "From:" address in messages sent by
# the named feature.
# When one of these is set, all messages sent by that feature will use the
# supplied email address as the "From:" address, and the address of the relevant
# user will be set as the "Reply-to:" address for the message.
# These may be required if you have provided an SMTP username and password in
# site.conf.  They can also be used to improve email verification and avoid
# messages getting filtered as spam.

$feedback_sender_email = ''; # For student feedback
$instructor_sender_email = ''; # For instructors emailing students
$jitar_sender_email = ''; # For notifications of incomplete JiTaR sets


# 顯示所有 PHP 錯誤
$SHOW_ERRORS = 1;
$DEBUG = 1;

# 讓 LTI module 顯示錯誤
$display_errors = 1;
$WEBSERVER_LOG_ERRORS = 0;  # 0 = 不只寫 log, 1 = 寫 log

# By default, feedback is sent to all users who have permission to
# receive_feedback in a course. 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
#   $permissionLevels{submit_feedback} = 'nobody'. This will cause the
#   feedback button to go away as well.
#
# * If you want to send email ONLY to addresses in this list, set
#   $permissionLevels{receive_feedback} = 'nobody'.
#
# 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',
];

# 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";

################################################################################
# Theme
################################################################################

#$defaultTheme = "math4";

# 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
################################################################################

# This must be a language code for a language that is supported by webwork.
# Note that this is also used for the locale for date/time formats.
# Check the directory lib/WeBWorK/Localize to see which languages are
# currently supported (e.g. en, es, fr, he-IL, tr, zh-HK).
# This can be set per course in course.conf or via the course configuration.
#$language = "en";

################################################################################
# Student Date Format
################################################################################

# This is the format of the dates displayed for students.  This can be created
# from the strftime patterns documented at https://metacpan.org/pod/DateTime#strftime-Patterns,
# or can be one of the localizable DateTime::Locale::FromData formats
# 'datetime_format_short', 'datetime_format_medium', 'datetime_format_long', or
# 'datetime_format_full'.  See https://metacpan.org/pod/DateTime::Locale::FromData.
# The default is 'datetime_format_long' which will display (for the English
# language): June 27, 2023 at 10:39:00 AM EST
# The commented out line that is demonstrated below will display (for the English
# language): Wed Jun 27 at 10:30am
#$studentDateDisplayFormat = "%a %b %d at %l:%M%P";

################################################################################
# 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}/defaultSetHeader.pg";
#$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/myHardcopyHeaderFile.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} = "$courseDirs{templates}/defaultSetHeader.pg";
#$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/myScreenHeaderFile.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",
	#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 (which is the default).

# 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} = "professor";

################################################################################
# Initial password fallback
################################################################################

# This sets the default fallback source to use for a user's password when a user
# account is created in a course. That is the source that will be shown by
# default in a select menu in the user interface, and the source that will be
# used by the importClassList.pl and addcourse scripts.  It can be one of
# 'user_id', 'first_name', 'last_name', or 'student_id', or can be set to '' (or
# anything not listed before).  If a user is created and no password is
# explicitly provided, then this source will used for the password (assuming
# that source value is also set).  If this is not one of the allowed sources,
# and if a password is not explicitly provided, then the user will be created
# without a password and will not be able to sign in with username and password.
# Note that this is only used at the time that a user is initially created in a
# course, and not when editing passwords at a later time.
#$fallback_password_source = 'student_id';

################################################################################
# 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 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 Library Browser and Set Detail page.
#$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.

################################################################################
# Problem creation defaults
################################################################################

# The default weight (also called value) of a problem to use when using the
# Library Browser, Problem Editor, or Sets Manager 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 Sets Manager 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 Sets Manager 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;

# The default number of attempts after which to show hints for newly created problems.
# It is suggested to use the value of -2, which means that the course-wide setting would be used
# Setting this to -2 defaults to the use of course-wide settings (suggested)
# Setting this to -1 disables hints in problems.
# Setting this to 0 or more will show hints after that number of attempts.
#$problemDefaults{showHintsAfter} = 2;

################################################################################
# Enter key behavior
################################################################################
# If this is set to "preview", hitting the enter key on a problem page activates
# the "Preview My Answers" button. If this is set to "submit", then the enter
# key activates the "Submit Answers" button instead. Or if that button is not
# present, it will activate the "Check Answers" button. Or if that button is
# also not present, it will just activate the "Preview My Answers" button.
# A third option is "conservative". In this case, the enter key behaves like "preview"
# when the "Submit" button is available and there are only finitely many
# attempts allowed. Otherise the enter key behaves like "submit".
#$pg{options}{enterKey} = 'conservative';

################################################################################
# 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.)
################################################################################

# 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 'dvisvgm' as
# 'dvisvgm' will generally create a better 'svg'. However, if you see issues
# with that, then you may want to switch this to 'pdf2svg'.
#$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';

################################################################################
# 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/html. If this is in a different location on your system, edit the
# lines below accordingly.  Note that you will also need to ensure server user
# has read and write permission for the directory.
# To implement, uncomment the following 6 lines:
#$webworkDirs{htdocs_temp}   = '/var/www/html/wwtmp';
#$webworkURLs{htdocs_temp}   = '/wwtmp';
#$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
#$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
#$courseDirs{html_temp}      = "/var/www/html/wwtmp/$courseName";
#$courseURLs{html_temp}      = "/wwtmp/$courseName";

#####################
# Additional PG modules
#####################

#push (@{${pg}{modules}}, [qw(LaTeXImage)]);

################################################################################
# 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
################################################################################

# Extra modules have been created to allow WeBWorK to use certain external
# methods of authentication.

# Select the authentication module to use for normal logins.
# If this value is a string, then that authentication module will be used.  If
# this value is a reference to an array of strings, then each string in the
# array will be successively tested to see if it provides a module that can
# handle the authentication request (by calling that module's
# request_has_data_for_this_verification_module method).  The first module that
# responds affirmatively will be used.
#$authen{user_module} = [
#	"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";

# List of authentication modules that may be used to enter the admin course.
# This is used instead of $authen{user_module} when logging into the admin course.
# Since the admin course provides overall power to add/delete courses, access
# to this course should be protected by the best possible authentication you
# have available to you.  The current default is
# WeBWorK::Authen::Basic_TheLastOption which is simple password based
# authentication for a password locally stored in your WeBWorK server's
# database.  On one hand, this is necessary as the initial setting, as it is the
# only option available when a new server is being installed, on the other hand,
# this option does not provide any capabilities to prevent dictionary attacks, etc.
# At the very least you should use a very strong password with two factor authentication.
# If you have the option to use a more secure authentication approach to the admin course
# (one which you are confident cannot be spoofed) that is preferable.
#
# Note that if you include authentication module config files further down,
# those may override the setting of $authen{admin_module} here.

#$authen{admin_module} = [
#	'WeBWorK::Authen::LDAP',
#	'WeBWorK::Authen::Basic_TheLastOption'
#];

################################################################################
# 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.
# You will also need to copy and edit authen_LTI_1_1.conf.dist to
# authen_LTI_1_1.conf, or authen_LTI_1_3.conf.dist to authen_LTI_1_3.conf
# depending on which is enabled in authen_LTI.conf (both can be enabled).

include("conf/authen_LTI.conf");

################################################################################
# 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");

################################################################################
# Shibboleth Authentication
################################################################################

# Uncomment the following line to enable Shibboleth authentication.  You will
# also need to copy the file authen_shibboleth.conf.dist to authen_shibboleth.conf,
# and then edit that file to fill in the settings for your installation.

#include("conf/authen_shibboleth.conf");

################################################################################
# Saml2 Authentication
################################################################################
# Uncomment the following line to enable authentication via a Saml2 identity
# provider.  You will also need to copy the file authen_saml2.conf.dist to
# authen_saml2.conf, and then edit that file to fill in the settings for your
# installation.

#include("conf/authen_saml2.conf");

################################################################################
# Session Management
################################################################################

# Session management can be handled either using the key database, the
# traditional method, or by using signed session cookies.

# Setting $session_management_via="key" uses the key database for session
# management. If password authentication is used, then a user can opt to use a
# session cookie with a duration determined by the $sessionTimeout setting
# below by checking the "Remember Me" checkbox on the login page.

# Setting $session_management_via="session_cookies" uses a session cookie to
# manage the session. Note that even in this case a key is stored in the
# database which is compared to the key stored in the session cookie. The
# lifetime of the cookie is determined by the $sessionTimeout setting below.

# Note that the key database method is less secure as the key must be embeded in
# the page and added as a url parameter in order to maintain the session. These
# things can be accessed by malicious javascript. The session cookies are http
# only cookies which can not be accessed via javascript.

# The default value for $session_management_via is "session_cookie".

#$session_management_via = "key";

# This is the length of time (in seconds) after which a user's session becomes
# invalid if they have no activity. The default is 30 minutes (60*30 seconds).

#$sessionTimeout = 60*60*2;

################################################################################
# Cookie control settings
################################################################################

# Set the value of the samesite attribute of the session cookie:
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
# Notes about the $CookieSameSite options:
# The "None" setting should only be used with HTTPS and when $CookieSecure is
# set to 1 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 webwork2
# servers.
#$CookieSameSite = "None";
#$CookieSameSite = "Strict";
#$CookieSameSite = "Lax";

# Set the value of the secure cookie attribute.
# The default is 1, so if you are serving without https then set this to 0.
$CookieSecure = 0;
# 全站關 2FA（保險）
$authen{enable_2fa} = 0;
$authen{two_factor_authentication} = 0;

# 關閉 LTI 的 2FA（關鍵）
$LTI{disable_2fa} = 1;

# 強制標記 LTI 為 external auth
$LTI{external_auth} = 1;


# If $useSessionCookie is set to 1, then a "session" cookie will be used. This
# means that the cookie will be deleted when the browser session ends.
# Typically, this is when the browser is closed. Note that the browser defines
# when this is, and some browser's also allow sessions to be restored when the
# browser is reopened. In any case, a user's session will end when the session
# is idle for more than the number of seconds the $sessionTimeout value is set
# to.
#$useSessionCookie = 1;

################################################################################
# Two Factor Authentication
################################################################################

# The following variables enable two factor authentication and control how it
# works. Two factor authentication only applies to courses that use password
# authentication, i.e., the Basic_TheLastOption user authentication module
# without an external authentication approach (like LTI, CAS, Shibboleth, etc.).
# It is recommended that two factor authentication be enabled for all courses
# that use password authentication. It is extremely highly recommended that this
# be enabled for the admin course. Two factor authentication works with an
# authenticator app on a mobile device (such as Google Authenticator,
# Microsoft authenticator, Twilio Authy, etc.).

# $twoFA{enabled} determines if two factor authentication is enabled for a
# course. If this is set to 0, then two factor authentication is disabled for
# all courses. If this is 1 (the default), then two factor authentication is
# enabled for all courses that use password authentication. If this is a string
# course name like 'admin', then two factor authentication is enabled only for
# that course. If this is an array of string course names, then two factor
# authentication is enabled only for those courses listed. This can also be set
# in a course's course.conf file. Note that only the values of 0 and 1 make
# sense there.
#$twoFA{enabled} = $admin_course_id; # Use this at the very least.
#$twoFA{enabled} = [$admin_course_id, 'another_courseID', 'another_courseID_3'];

# There are two methods that can be used to setup two factor authentication when
# a user signs in for the first time. The setup information can be emailed to
# the user, or can be directly displayed in the browser on the next page that is
# shown after password verification succeeds.
#
# If $twoFA{email_sender} is set, then the email approach will be used. In this
# case, after a user signs in and the password is verified, the user will be
# sent an email containing a QR code and instructions on how to set up a OTP
# generator app. This is probably a more secure way to set up two factor
# authentication, as it ensures the user setting it up is the correct user. Note
# that if a user does not have an email address, then the browser method below
# will be used as a fallback.
#
# If $twoFA{email_sender} is not set, then after a user signs in and the
# password is verified, the QR code, OTP link, and instructions will be
# displayed directly on the page in the browser. This is potentially less secure
# because a hacker could guess a username and password before a user has setup
# two factor authentication (particularly if the username and password are
# initially the same), and then the hacker would gain access to that user's
# account, and the actual user would be locked out. Note that you will need to
# use this option if your server can not send emails. Also note that no-reply
# addresses may be blocked by the email server or marked as spam. So it may be
# better to find a valid email address to use for this.
#$twoFA{email_sender} = 'noreply@your.school.edu';

# When a user signs in and enters the two factor authentication code, the user
# has the option to skip two factor verification on a given device for
# subsequent logins. That will only last for the amount of time set as the
# skip_verification_code_interval. By default this is set to one year. However,
# good security practices most likely recommend a shorter time interval for
# this. So change this value if you want to require a shorter and thus more
# secure time interval before users will need to enter the two factor
# authentication code again.
#$twoFA{skip_verification_code_interval} = 3600 * 24 * 7;

# By default all users with the role of "student" or higher are required to use
# two factor authentication when signing in with a username and password. If
# you want to disable two factor authentication for students, but require it for
# instructors then set the permission level below to "login_proctor" (or
# higher).

#$permissionLevels{use_two_factor_auth} = "login_proctor";

################################################################################
# Searching for set.def files to import
################################################################################
# In the set manager and the library browser, the directory depth 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.

#$options{setDefSearchDepth} = 4;

################################################################################
# Permission overrides (e.g. "admin", "professor", "ta", "student", "guest"
################################################################################

#$permissionLevels{show_resource_info}               = "admin";
#$permissionLevels{show_pg_info}                     = "admin";
#$permissionLevels{show_answer_hash_info}            = "admin";
#$permissionLevels{show_answer_group_info}           = "admin";
#$permissionLevels{modify_tags}                      = "admin";

################################################################################
# Hardcopy Theme
################################################################################

# Hardcopy themes are .xml files.  See assets/hardcopThemes/README.md for details
# about their structure.  The site themes are files in $webworkDirs{hardcopyThemes}.
# $hardcopyThemes identifies which site themes are enabled.
#$hardcopyThemes = [
#	'empty.xml',
#	'basic.xml',
#	'basicTwoCol.xml',
#	'classic.xml',
#	'classicTwoCol.xml',
#	'oneColumn.xml',
#	'twoColumn.xml',
#	'boxed.xml',
#	'boxedTwoCol.xml',
#	'boxedRows.xml',
#	'hebrew.xml',
#	'hebrewTwoCol.xml',
#];

# xelatex is the default external program used to generate pdf from LaTeX.  It
# supports unicode characters (needed for multilingual use among other things).
# Newer versions of DateTime::Locale use a narrow no-break space in US dates.
# So xelatex is needed even for English.  Note that --no-shell-escape is
# important for security reasons.  You may be able to use pdflatex instead of
# xelatex if you have an older version of DateTime::Locale on your system.
# However, pdflatex does not support unicode characters.
#$externalPrograms{latex2pdf} = "/usr/bin/pdflatex --no-shell-escape";

# A course may have additional themes in $courseDirs{hardcopyThemes}.  All such
# "course" hardcopy themes are effectively enabled and offered for use when
# selecting a hardcopy theme.  You can move such files or rename them to not
# have a .xml extension if you don't want them to be offered for use.

# If a course hardcopy theme has the same name as a site hardcopy theme, the
# course hardcopy theme is the one that is used.

# Default hardcopy themes (should either be an enabled site theme or a theme in
# the course hardcopyThemes folder
#$hardcopyTheme = 'twoColumn.xml';
#$hardcopyThemePGEditor = 'empty.xml';

################################################################################
# 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();
# 	return {
# 		'id' => $caliper_id,
# 		'type' => 'Person',
# 		'name' => $user->first_name() . " " . $user->last_name(),
# 	};
# };

###############################################################################
# Test settings
###############################################################################

# Cap for the number of problems that can be used on a page.
# If 0, there is no cap. Otherwise, should be a positive integer.
#$test{maxProblemsPerPage} = 1;

1; #final line of the file to reassure perl that it was read properly.
