#!perl ############################################################################# # authen_LTI.conf # Configuration for using LTI authentication. # To enable this file, uncomment the appropriate lines in localOverrides.conf ############################################################################# # 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 $debug_lti_parameters = 0; # 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). $debug_lti_grade_passback = 0; # 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. # This first section enables LTI authentication. # Failover to Basic_TheLastOption is necessary to authenticate with # cookie keys. ################### $authen{user_module} = [ { "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method { "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method { "*" => "WeBWorK::Authen::Basic_TheLastOption",} #fallback authorization method ]; #$authen{user_module} = [ #{ "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method #{ "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method #]; # If the preferred module is an external authentication # module but the sequence includes an internal authentication # system, e.g., Basic_TheLastOption, then the following line # must be commented out. # If it is uncommented and the value = 1, # then, if the authentication sequence reaches # Basic_TheLastOption, then WeBWorK::Login # will display a screen directing the user # back to an external authentication system. # This prevents you from attempting to login in to WeBWorK directly. $external_auth=0; # NOTE: If external authentication is disabled # then you should probably also prevent students # from changing their passwords (because they cant use them). # To do this ucomment the following # $permissionLevels{change_password} = "ta"; ################################################################################ # LTI Basic parameters ################################################################################ ################################################################################ # LTI Preferred Source of Username ################################################################################ # If both lis_person_sourcedid (or one of its variants) # and lis_person_contact_email_primary are present, # then one needs to state which one is preferred # as the WeBWorK username. # The considerations are (1) ensuring that usernames # are unique and (2) being as compatible as possible with the practices # of the institutions that are being served in a site. # If a site is only being used be students from a single # institution and the value lis_person_sourcedid is # unique across the population and matches the logon username # at that institution, then lis_person_sourcedid is # probably the better choice. # On the other hand, if a site is serving a population # from several institutions and lis_person_sourcedid is not # necessarily unique across the population, then # lis_person_contact_email_primary is the better choice. # Because the WeBWorK username must be unique across # the population served by a site, the default if # neither line is uncommented will be the value of # lis_person_contact_email_primary. # NOTE: Even if a course management system sends # one of the common misspellings of "lis_person_sourcedid", i.e., # lis_person_sourced_id, lis_person_source_id, and # lis_person_sourceid, one must nevertheless use # the correct spelling here, i.e. "lis_person_sourcedid". #$preferred_source_of_username = "lis_person_sourcedid"; $preferred_source_of_username = "lis_person_contact_email_primary"; # Some LMS systems, Blackboard in particular, do not send lis_person_sourcedid # if you enable this flag and have $preferred_source_of_username set to # lis_person_contact_email_primary, then webwork will strip off the address # portion of the email and just use the username. $strip_address_from_email = 1; ################################################################################ # LTI Preferred source of Student Id ################################################################################ # If preferred_source_of_student_id is not set, WeBWorK will look in the LTI # parameter 'custom_student_id.' If preferred_source_of_student_id is set, then # WeBWorK will look in the LTI parameter specified below. This parameter may be # dependendent on the LMS. E.G., In D2L, student_id is stored in OrgDefinedId and # the corresponding LTI parameter is called ext_d2l_orgdefinedid. #$preferred_source_of_student_id = "ext_d2l_orgdefinedid"; ################################################################################ # LTI Basic Authentication Parameters ################################################################################ # This "shared secret" is entered in the LMS request form and needs to be # match the entry here. This is used to validate all requests between the # LMS and WeBWorK # You should choose your own secret word for security and should treat it # like a password. $LTIBasicConsumerSecret = "RxnQ7XdBNHtA4vHqChZl"; #This must be set # The purpose of the LTI nonces is to prevent man-in-the-middle attacks. # The NonceLifeTime (in seconds) must be short enought to prevent # at least casual man-in-the-middle attacks but # long enough to accommodate normal server and networking delays # (and perhaps non-synchronization of server time clocks). # $NonceLifeTime=60; # in seconds # WeBWorK will automatically create users when logging in via the LMS for the # first time. If the following flag is enabled then it will also keep the # user demographic data up to date with the LMS. If a users information change # in the LMS then it will change in WeBWorK. However, any changes to the # student data via WeBWorK will be overwritten the next time the student # logs in. $LMSManageUserData=1; # NOTE: If mange user data is enabled then you should probably also # prevent students from changing their email because the changes # will be overwritten. To do this ucomment the following # $permissionLevels{change_email} = "ta"; # This allows you to override the URL that Oauth will use to validate the # authentication. This is important if you have some sort of setup (e.g. load # distributing) where the path in the LMS does not match the path that ends up # in the webwork page #$LTIBasicToThisSiteURL = ""; ################################################################################ # Authorization system LTI: LMS Grade Passback ################################################################################ # WeBWorK can automatically report grades back to your LMS. However the # system is reasonably restrictive. When you create an LTI link in your # LMS you can choose to have that LTI link have a grade associated to it. # WeBWorK can report back a single percentage as the "grade" for that link. # There are two modes under which this can occur. # # Single Course Grade Mode: $LTIGradeMode = "course"; # # In this mode you create a single Link/Assignment which points to your # WeBWorK Course address. E.G. In Blackboard # Name: WeBWorK # URL: https://webwork.university.edu/webwork2/CourseName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a LMS grade associated to the Link/Assignment # which is determined by their percentage total homework grade in WeBWorK. # This total homework grade is the same as the grade that is reported on the # grades page. You can change the weight of sets by altering the weight of # the problems in the set. # # Individual Homework Grade Mode: $LTIGradeMode = "homework"; # # In this mode you create a single Link/Assignment for *every* homework set in # the course. The address should be the address of that set in the Course. # E.G. in Blackboard # Name: Set Name # URL: https://webwork.university.edu/webwork2/CourseName/SetName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a grade for each Link/Assignment which is determined # by their percentage homework grade on the Set which the Link/Assignment # points to. Students need to use the Link/Assignment in the LMS at least once # to enable grade passback. In particular when working in this mode it is # recommended that you only allow students to log in via the LMS. # # Note: For both of these modes only the grades are passed back. In # particular nothing else about the Link/Assignment in the LMS and the # homework set in WeBWorK is syncronized. In particular the total number of # points/problems, the due dates, the open dates are not kept in sync # automatically. #$LTIGradeMode = "course"; $LTIGradeMode = "homework"; # When set this variable sends grades back to the LMS every time a user # submits an answer. This keeps students grades up to date but can be # a drain on the server. $LTIGradeOnSubmit = 1; # The system periodically updates student grades on the LMS. This # variable controls how often that happens. Set to -1 to disable. #$LTIMassUpdateInterval = 86400; #in seconds $LTIMassUpdateInterval = 300; #in seconds ################################################################################ # Authorization system LTI: LMS Roles Mapped to WeBWorK Roles ################################################################################ # You may need to customize this hash to take into account the roles # that are used in your LMS. Set the debug_lti_parameters flag to see # what roles are being reported to WeBWorK by your LMS %LMSrolesToWeBWorKroles = ( "librarian" => "guest", "observer" => "guest", "visitor" => "guest", "Guest" => "guest", "Designer" => "professor", "instructor" => "professor", "Instructor" => "professor", "Faculty" => "professor", "Teacher" => "professor", "Student" => "student", "Learner" => "student", "student" => "student", "AI/TA" => "ta", "TA" => "ta", "Teaching Assistant" => "ta", "Teaching Assistant (TA)" => "ta", "Non-editing teacher" => "ta", "Grader" => "ta", ); # For security reasons accounts with high permissions should not be auto # created via LTI requests. Set this variable to "professor" if you want # professor accounts to be created automatically #$LTIAccountCreationCutoff = "ta"; $LTIAccountCreationCutoff = "professor"; ################################################################################ # Local routines ################################################################################ # These local routines can be used to modify and override various elements of # the authentication process. ################################################################################ # Local routine to modify users ################################################################################ # When users are added to the system WeBWorK will do its best to fill out # user information. However, institutions can add code to the following # routine to set fields not normally set by WeBWorK. E.G. The student ID # field. #$LTI_modify_user = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # # The user object to be modified # my $user = shift; # # # Parse context_id for additional information. E.G. # my @course_id=split /-/, $self -> {"context_id"}; # $user->{"section"} = $course_id[4]; # }; ################################################################################ # Local routine to modify user sets ################################################################################ # When users are added to the system they are also assigned all visible sets # This routine can be used to modify the sets before they are assigned. E.G. # extend due dates based off the number of problems students have to do #$LTI_modify_user_set = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # my $globalSet = shift; # # The userSet object to be modified # my $userSet = shift; # my $numberOfSetsAssigned = $self->{numberOfSetsAssigned}; # my $daysPerSetMakeup = 2; # my $reasonableNumberOfDays = $numberOfSetsAssigned*$daysPerSetMakeup +1; # if ($reasonableNumberOfDays < 2) {$reasonableNumberOfDays = 2;} # my $niceDueTime = $globalSet->due_date + $reasonableNumberOfDays*86400; # my $niceAnswerTime = $niceDueTime + 600; # $userSet->due_date($niceDueTime); # $userSet->answer_date($niceAnswerTime); #}; 1; #final line of the file to reassure perl that it was read properly. #!perl ################################################################################ # WeBWorK Online Homework Delivery System # Copyright 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/ # # 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.conf 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', ]; ### additional mail overrides # Use this to customize the text of the feedback button. $feedback_button_name = "Email WeBWorK TA"; ################################################################################ # Repository Information ############################################################################### # This is where you put your 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. If your course list page in the admin course is very slow # consider disabling this option. $enableGitUpgradeNotifier = 0; $gitWeBWorKRemoteName = "origin"; $gitWeBWorKBranchName = "master"; $gitPGRemoteName = "origin"; $gitPGBranchName = "master"; $gitLibraryRemoteName = "origin"; $gitLibraryBranchName = "master"; ################################################################################ # Theme ################################################################################ $defaultTheme = "math4"; $defaultThemeTemplate = "system"; ################################################################################ # 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. You should consider changing this to point # to a file which is not tracked by git $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; #$webworkFiles{site_info} = "$webworkDirs{htdocs}/our_site_info.txt"; # The setHeader preceeds 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"; #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default hardcopy only header file #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.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 $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg"; # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default screen HTML only header file # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg"; ################################################################################ # NationalProblemLibrary -- OpenProblemLibrary ################################################################################ # For configuration instructions, see: # http://webwork.maa.org/wiki/National_Problem_Library # The directory containing the natinal problem library files. Set to "" if no problem # library is installed. # NationalProblemLibrary (NPL) has been renamed to OpenProblemLibrary (OPL) $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 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; # 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", # ContribDir => "Contrib", 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. $permissionLevels{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 undef setting means that even professor answers are logged and # saved in the past answer database. #$permissionLevels{record_set_version_answers_when_acting_as_student} = "professor"; #$permissionLevels{record_answers_when_acting_as_student} = "professor"; ################################################################################ # 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} = 1; # This sets if mathview is available on the PG editor for use as a minimal latex equation editor $options{PGMathView} = 0; $options{PGWirisEditor} = 0; $options{PGMathQuill} = 0; ################################################################################ # PG subsystem options ################################################################################ # List of enabled display modes. Comment out any modes you don't wish to make # available for use. $pg{displayModes} = [ # "plainText", # display raw TeX for math expressions "images", # display math expressions as images generated by dvipng "MathJax", # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax, and it is requred if you want to use mathview ]; # Default display mode. Should be an uncommented item listed above. $pg{options}{displayMode} = "MathJax"; #$webworkURLs{MathJax} = "$server_root_url/$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS_CHTML-full"; $webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; ################################################################################ # 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 ################################################################################ # Configuring the display of different versions of the editors ################################################################################ # These configurations can be placed in course.conf file to tune the behavior for individual courses # These will enable the versions of the problem set detail page and library browser page # that do not use the xmlrpc pathway #$showeditors{problemsetdetail1} = 1; #$showeditors{librarybrowsernojs} = 1; # This will enable the PG problem editor 3 $showeditors{pgproblemeditor3} = 1; $showeditors{pgproblemeditor2} = 0; $showeditors{simplepgeditor} = 0; # This will turn off ww3 #$showeditors{ww3} = 0; # Similar changes can be made in the same way for other editors. # Look at the relevant section of default.config to # see the default settings for each editor. # (The syntax is slightly different there because the configurations # for all of the editors are being set in the configuration hash.) ################################################################################ # 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(TikZ_Image2)]); ################################################################################ # 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=> < # if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) { # MathJax.Hub.Config({ # config: [], # skipStartupTypeset: false # }); # } # # END_PREAMBLE ################################################################################ # Authentication Methods ################################################################################ # Extra modules have been created to allow WeBWorK to use certain external # methods of authentication. ################################################################################ # 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 = 1; #$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. ################################################################################ # 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 Managment 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"; ################################################################################ # 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. $hardcopyThemes = [ qw ( oneColumn twoColumn XeLaTeX-oneColumn XeLaTeX-twoColumn XeLaTeX-Hebrew-oneColumn XeLaTeX-Hebrew-twoColumn )]; # Hardcopy theme names (pretty names for themes) $hardcopyThemeNames = { oneColumn => 'pdfLaTeX - English - One Column', twoColumn => 'pdfLaTeX - English - Two Columns', XeLaTeX-oneColumn => 'XeLaTeX - English - one Column', XeLaTeX-twoColumn => 'XeLaTeX - English - two Columns', XeLaTeX-Hebrew-oneColumn => 'XeLaTeX - Hebrew/English - one Column', XeLaTeX-Hebrew-twoColumn => 'XeLaTeX - Hebrew/English - two Columns', }; # Change default Hardcopy theme - in order to use an XeLaTeX theme, we must set # $externalPrograms{pdflatex} to use xelatex (here or in site.conf) !!! #$hardcopyTheme = "XeLaTeX-twoColumn"; #$externalPrograms{pdflatex} ="/usr/bin/xelatex --shell-escape"; ################################################################################ 1; #final line of the file to reassure perl that it was read properly. #!perl ############################################################################# # authen_LTI.conf # Configuration for using LTI authentication. # To enable this file, uncomment the appropriate lines in localOverrides.conf ############################################################################# # 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 $debug_lti_parameters = 0; # 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). $debug_lti_grade_passback = 0; # 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. # This first section enables LTI authentication. # Failover to Basic_TheLastOption is necessary to authenticate with # cookie keys. ################### $authen{user_module} = [ { "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method { "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method { "*" => "WeBWorK::Authen::Basic_TheLastOption",} #fallback authorization method ]; #$authen{user_module} = [ #{ "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method #{ "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method #]; # If the preferred module is an external authentication # module but the sequence includes an internal authentication # system, e.g., Basic_TheLastOption, then the following line # must be commented out. # If it is uncommented and the value = 1, # then, if the authentication sequence reaches # Basic_TheLastOption, then WeBWorK::Login # will display a screen directing the user # back to an external authentication system. # This prevents you from attempting to login in to WeBWorK directly. $external_auth=0; # NOTE: If external authentication is disabled # then you should probably also prevent students # from changing their passwords (because they cant use them). # To do this ucomment the following # $permissionLevels{change_password} = "ta"; ################################################################################ # LTI Basic parameters ################################################################################ ################################################################################ # LTI Preferred Source of Username ################################################################################ # If both lis_person_sourcedid (or one of its variants) # and lis_person_contact_email_primary are present, # then one needs to state which one is preferred # as the WeBWorK username. # The considerations are (1) ensuring that usernames # are unique and (2) being as compatible as possible with the practices # of the institutions that are being served in a site. # If a site is only being used be students from a single # institution and the value lis_person_sourcedid is # unique across the population and matches the logon username # at that institution, then lis_person_sourcedid is # probably the better choice. # On the other hand, if a site is serving a population # from several institutions and lis_person_sourcedid is not # necessarily unique across the population, then # lis_person_contact_email_primary is the better choice. # Because the WeBWorK username must be unique across # the population served by a site, the default if # neither line is uncommented will be the value of # lis_person_contact_email_primary. # NOTE: Even if a course management system sends # one of the common misspellings of "lis_person_sourcedid", i.e., # lis_person_sourced_id, lis_person_source_id, and # lis_person_sourceid, one must nevertheless use # the correct spelling here, i.e. "lis_person_sourcedid". #$preferred_source_of_username = "lis_person_sourcedid"; $preferred_source_of_username = "lis_person_contact_email_primary"; # Some LMS systems, Blackboard in particular, do not send lis_person_sourcedid # if you enable this flag and have $preferred_source_of_username set to # lis_person_contact_email_primary, then webwork will strip off the address # portion of the email and just use the username. $strip_address_from_email = 1; ################################################################################ # LTI Preferred source of Student Id ################################################################################ # If preferred_source_of_student_id is not set, WeBWorK will look in the LTI # parameter 'custom_student_id.' If preferred_source_of_student_id is set, then # WeBWorK will look in the LTI parameter specified below. This parameter may be # dependendent on the LMS. E.G., In D2L, student_id is stored in OrgDefinedId and # the corresponding LTI parameter is called ext_d2l_orgdefinedid. #$preferred_source_of_student_id = "ext_d2l_orgdefinedid"; ################################################################################ # LTI Basic Authentication Parameters ################################################################################ # This "shared secret" is entered in the LMS request form and needs to be # match the entry here. This is used to validate all requests between the # LMS and WeBWorK # You should choose your own secret word for security and should treat it # like a password. $LTIBasicConsumerSecret = "RxnQ7XdBNHtA4vHqChZl"; #This must be set # The purpose of the LTI nonces is to prevent man-in-the-middle attacks. # The NonceLifeTime (in seconds) must be short enought to prevent # at least casual man-in-the-middle attacks but # long enough to accommodate normal server and networking delays # (and perhaps non-synchronization of server time clocks). # $NonceLifeTime=60; # in seconds # WeBWorK will automatically create users when logging in via the LMS for the # first time. If the following flag is enabled then it will also keep the # user demographic data up to date with the LMS. If a users information change # in the LMS then it will change in WeBWorK. However, any changes to the # student data via WeBWorK will be overwritten the next time the student # logs in. $LMSManageUserData=1; # NOTE: If mange user data is enabled then you should probably also # prevent students from changing their email because the changes # will be overwritten. To do this ucomment the following # $permissionLevels{change_email} = "ta"; # This allows you to override the URL that Oauth will use to validate the # authentication. This is important if you have some sort of setup (e.g. load # distributing) where the path in the LMS does not match the path that ends up # in the webwork page #$LTIBasicToThisSiteURL = ""; ################################################################################ # Authorization system LTI: LMS Grade Passback ################################################################################ # WeBWorK can automatically report grades back to your LMS. However the # system is reasonably restrictive. When you create an LTI link in your # LMS you can choose to have that LTI link have a grade associated to it. # WeBWorK can report back a single percentage as the "grade" for that link. # There are two modes under which this can occur. # # Single Course Grade Mode: $LTIGradeMode = "course"; # # In this mode you create a single Link/Assignment which points to your # WeBWorK Course address. E.G. In Blackboard # Name: WeBWorK # URL: https://webwork.university.edu/webwork2/CourseName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a LMS grade associated to the Link/Assignment # which is determined by their percentage total homework grade in WeBWorK. # This total homework grade is the same as the grade that is reported on the # grades page. You can change the weight of sets by altering the weight of # the problems in the set. # # Individual Homework Grade Mode: $LTIGradeMode = "homework"; # # In this mode you create a single Link/Assignment for *every* homework set in # the course. The address should be the address of that set in the Course. # E.G. in Blackboard # Name: Set Name # URL: https://webwork.university.edu/webwork2/CourseName/SetName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a grade for each Link/Assignment which is determined # by their percentage homework grade on the Set which the Link/Assignment # points to. Students need to use the Link/Assignment in the LMS at least once # to enable grade passback. In particular when working in this mode it is # recommended that you only allow students to log in via the LMS. # # Note: For both of these modes only the grades are passed back. In # particular nothing else about the Link/Assignment in the LMS and the # homework set in WeBWorK is syncronized. In particular the total number of # points/problems, the due dates, the open dates are not kept in sync # automatically. #$LTIGradeMode = "course"; $LTIGradeMode = "homework"; # When set this variable sends grades back to the LMS every time a user # submits an answer. This keeps students grades up to date but can be # a drain on the server. $LTIGradeOnSubmit = 1; # The system periodically updates student grades on the LMS. This # variable controls how often that happens. Set to -1 to disable. #$LTIMassUpdateInterval = 86400; #in seconds $LTIMassUpdateInterval = 300; #in seconds ################################################################################ # Authorization system LTI: LMS Roles Mapped to WeBWorK Roles ################################################################################ # You may need to customize this hash to take into account the roles # that are used in your LMS. Set the debug_lti_parameters flag to see # what roles are being reported to WeBWorK by your LMS %LMSrolesToWeBWorKroles = ( "librarian" => "guest", "observer" => "guest", "visitor" => "guest", "Guest" => "guest", "Designer" => "professor", "instructor" => "professor", "Instructor" => "professor", "Faculty" => "professor", "Teacher" => "professor", "Student" => "student", "Learner" => "student", "student" => "student", "AI/TA" => "ta", "TA" => "ta", "Teaching Assistant" => "ta", "Teaching Assistant (TA)" => "ta", "Non-editing teacher" => "ta", "Grader" => "ta", ); # For security reasons accounts with high permissions should not be auto # created via LTI requests. Set this variable to "professor" if you want # professor accounts to be created automatically #$LTIAccountCreationCutoff = "ta"; $LTIAccountCreationCutoff = "professor"; ################################################################################ # Local routines ################################################################################ # These local routines can be used to modify and override various elements of # the authentication process. ################################################################################ # Local routine to modify users ################################################################################ # When users are added to the system WeBWorK will do its best to fill out # user information. However, institutions can add code to the following # routine to set fields not normally set by WeBWorK. E.G. The student ID # field. #$LTI_modify_user = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # # The user object to be modified # my $user = shift; # # # Parse context_id for additional information. E.G. # my @course_id=split /-/, $self -> {"context_id"}; # $user->{"section"} = $course_id[4]; # }; ################################################################################ # Local routine to modify user sets ################################################################################ # When users are added to the system they are also assigned all visible sets # This routine can be used to modify the sets before they are assigned. E.G. # extend due dates based off the number of problems students have to do #$LTI_modify_user_set = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # my $globalSet = shift; # # The userSet object to be modified # my $userSet = shift; # my $numberOfSetsAssigned = $self->{numberOfSetsAssigned}; # my $daysPerSetMakeup = 2; # my $reasonableNumberOfDays = $numberOfSetsAssigned*$daysPerSetMakeup +1; # if ($reasonableNumberOfDays < 2) {$reasonableNumberOfDays = 2;} # my $niceDueTime = $globalSet->due_date + $reasonableNumberOfDays*86400; # my $niceAnswerTime = $niceDueTime + 600; # $userSet->due_date($niceDueTime); # $userSet->answer_date($niceAnswerTime); #}; 1; #final line of the file to reassure perl that it was read properly. #!perl ################################################################################ # WeBWorK Online Homework Delivery System # Copyright 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/ # # 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.conf 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', ]; ### additional mail overrides # Use this to customize the text of the feedback button. $feedback_button_name = "Email WeBWorK TA"; ################################################################################ # Repository Information ############################################################################### # This is where you put your 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. If your course list page in the admin course is very slow # consider disabling this option. $enableGitUpgradeNotifier = 0; $gitWeBWorKRemoteName = "origin"; $gitWeBWorKBranchName = "master"; $gitPGRemoteName = "origin"; $gitPGBranchName = "master"; $gitLibraryRemoteName = "origin"; $gitLibraryBranchName = "master"; ################################################################################ # Theme ################################################################################ $defaultTheme = "math4"; $defaultThemeTemplate = "system"; ################################################################################ # 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. You should consider changing this to point # to a file which is not tracked by git $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; #$webworkFiles{site_info} = "$webworkDirs{htdocs}/our_site_info.txt"; # The setHeader preceeds 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"; #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default hardcopy only header file #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.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 $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg"; # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default screen HTML only header file # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg"; ################################################################################ # NationalProblemLibrary -- OpenProblemLibrary ################################################################################ # For configuration instructions, see: # http://webwork.maa.org/wiki/National_Problem_Library # The directory containing the natinal problem library files. Set to "" if no problem # library is installed. # NationalProblemLibrary (NPL) has been renamed to OpenProblemLibrary (OPL) $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 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; # 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", # ContribDir => "Contrib", 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. $permissionLevels{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 undef setting means that even professor answers are logged and # saved in the past answer database. #$permissionLevels{record_set_version_answers_when_acting_as_student} = "professor"; #$permissionLevels{record_answers_when_acting_as_student} = "professor"; ################################################################################ # 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} = 1; # This sets if mathview is available on the PG editor for use as a minimal latex equation editor $options{PGMathView} = 0; $options{PGWirisEditor} = 0; $options{PGMathQuill} = 0; ################################################################################ # PG subsystem options ################################################################################ # List of enabled display modes. Comment out any modes you don't wish to make # available for use. $pg{displayModes} = [ # "plainText", # display raw TeX for math expressions "images", # display math expressions as images generated by dvipng "MathJax", # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax, and it is requred if you want to use mathview ]; # Default display mode. Should be an uncommented item listed above. $pg{options}{displayMode} = "MathJax"; #$webworkURLs{MathJax} = "$server_root_url/$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS_CHTML-full"; $webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; ################################################################################ # 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 ################################################################################ # Configuring the display of different versions of the editors ################################################################################ # These configurations can be placed in course.conf file to tune the behavior for individual courses # These will enable the versions of the problem set detail page and library browser page # that do not use the xmlrpc pathway #$showeditors{problemsetdetail1} = 1; #$showeditors{librarybrowsernojs} = 1; # This will enable the PG problem editor 3 $showeditors{pgproblemeditor3} = 1; $showeditors{pgproblemeditor2} = 0; $showeditors{simplepgeditor} = 0; # This will turn off ww3 #$showeditors{ww3} = 0; # Similar changes can be made in the same way for other editors. # Look at the relevant section of default.config to # see the default settings for each editor. # (The syntax is slightly different there because the configurations # for all of the editors are being set in the configuration hash.) ################################################################################ # 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(TikZ_Image2)]); ################################################################################ # 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=> < # if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) { # MathJax.Hub.Config({ # config: [], # skipStartupTypeset: false # }); # } # # END_PREAMBLE ################################################################################ # Authentication Methods ################################################################################ # Extra modules have been created to allow WeBWorK to use certain external # methods of authentication. ################################################################################ # 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 = 1; #$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. ################################################################################ # 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 Managment 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"; ################################################################################ # 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. $hardcopyThemes = [ qw ( oneColumn twoColumn XeLaTeX-oneColumn XeLaTeX-twoColumn XeLaTeX-Hebrew-oneColumn XeLaTeX-Hebrew-twoColumn )]; # Hardcopy theme names (pretty names for themes) $hardcopyThemeNames = { oneColumn => 'pdfLaTeX - English - One Column', twoColumn => 'pdfLaTeX - English - Two Columns', XeLaTeX-oneColumn => 'XeLaTeX - English - one Column', XeLaTeX-twoColumn => 'XeLaTeX - English - two Columns', XeLaTeX-Hebrew-oneColumn => 'XeLaTeX - Hebrew/English - one Column', XeLaTeX-Hebrew-twoColumn => 'XeLaTeX - Hebrew/English - two Columns', }; # Change default Hardcopy theme - in order to use an XeLaTeX theme, we must set # $externalPrograms{pdflatex} to use xelatex (here or in site.conf) !!! #$hardcopyTheme = "XeLaTeX-twoColumn"; #$externalPrograms{pdflatex} ="/usr/bin/xelatex --shell-escape"; ################################################################################ 1; #final line of the file to reassure perl that it was read properly. #!perl ############################################################################# # authen_LTI.conf # Configuration for using LTI authentication. # To enable this file, uncomment the appropriate lines in localOverrides.conf ############################################################################# # 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 $debug_lti_parameters = 0; # 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). $debug_lti_grade_passback = 0; # 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. # This first section enables LTI authentication. # Failover to Basic_TheLastOption is necessary to authenticate with # cookie keys. ################### $authen{user_module} = [ { "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method { "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method { "*" => "WeBWorK::Authen::Basic_TheLastOption",} #fallback authorization method ]; #$authen{user_module} = [ #{ "*" => "WeBWorK::Authen::LTIAdvanced", }, #preferred authorization method #{ "*" => "WeBWorK::Authen::LDAP",} #fallback authorization method #]; # If the preferred module is an external authentication # module but the sequence includes an internal authentication # system, e.g., Basic_TheLastOption, then the following line # must be commented out. # If it is uncommented and the value = 1, # then, if the authentication sequence reaches # Basic_TheLastOption, then WeBWorK::Login # will display a screen directing the user # back to an external authentication system. # This prevents you from attempting to login in to WeBWorK directly. $external_auth=0; # NOTE: If external authentication is disabled # then you should probably also prevent students # from changing their passwords (because they cant use them). # To do this ucomment the following # $permissionLevels{change_password} = "ta"; ################################################################################ # LTI Basic parameters ################################################################################ ################################################################################ # LTI Preferred Source of Username ################################################################################ # If both lis_person_sourcedid (or one of its variants) # and lis_person_contact_email_primary are present, # then one needs to state which one is preferred # as the WeBWorK username. # The considerations are (1) ensuring that usernames # are unique and (2) being as compatible as possible with the practices # of the institutions that are being served in a site. # If a site is only being used be students from a single # institution and the value lis_person_sourcedid is # unique across the population and matches the logon username # at that institution, then lis_person_sourcedid is # probably the better choice. # On the other hand, if a site is serving a population # from several institutions and lis_person_sourcedid is not # necessarily unique across the population, then # lis_person_contact_email_primary is the better choice. # Because the WeBWorK username must be unique across # the population served by a site, the default if # neither line is uncommented will be the value of # lis_person_contact_email_primary. # NOTE: Even if a course management system sends # one of the common misspellings of "lis_person_sourcedid", i.e., # lis_person_sourced_id, lis_person_source_id, and # lis_person_sourceid, one must nevertheless use # the correct spelling here, i.e. "lis_person_sourcedid". #$preferred_source_of_username = "lis_person_sourcedid"; $preferred_source_of_username = "lis_person_contact_email_primary"; # Some LMS systems, Blackboard in particular, do not send lis_person_sourcedid # if you enable this flag and have $preferred_source_of_username set to # lis_person_contact_email_primary, then webwork will strip off the address # portion of the email and just use the username. $strip_address_from_email = 1; ################################################################################ # LTI Preferred source of Student Id ################################################################################ # If preferred_source_of_student_id is not set, WeBWorK will look in the LTI # parameter 'custom_student_id.' If preferred_source_of_student_id is set, then # WeBWorK will look in the LTI parameter specified below. This parameter may be # dependendent on the LMS. E.G., In D2L, student_id is stored in OrgDefinedId and # the corresponding LTI parameter is called ext_d2l_orgdefinedid. #$preferred_source_of_student_id = "ext_d2l_orgdefinedid"; ################################################################################ # LTI Basic Authentication Parameters ################################################################################ # This "shared secret" is entered in the LMS request form and needs to be # match the entry here. This is used to validate all requests between the # LMS and WeBWorK # You should choose your own secret word for security and should treat it # like a password. $LTIBasicConsumerSecret = "RxnQ7XdBNHtA4vHqChZl"; #This must be set # The purpose of the LTI nonces is to prevent man-in-the-middle attacks. # The NonceLifeTime (in seconds) must be short enought to prevent # at least casual man-in-the-middle attacks but # long enough to accommodate normal server and networking delays # (and perhaps non-synchronization of server time clocks). # $NonceLifeTime=60; # in seconds # WeBWorK will automatically create users when logging in via the LMS for the # first time. If the following flag is enabled then it will also keep the # user demographic data up to date with the LMS. If a users information change # in the LMS then it will change in WeBWorK. However, any changes to the # student data via WeBWorK will be overwritten the next time the student # logs in. $LMSManageUserData=1; # NOTE: If mange user data is enabled then you should probably also # prevent students from changing their email because the changes # will be overwritten. To do this ucomment the following # $permissionLevels{change_email} = "ta"; # This allows you to override the URL that Oauth will use to validate the # authentication. This is important if you have some sort of setup (e.g. load # distributing) where the path in the LMS does not match the path that ends up # in the webwork page #$LTIBasicToThisSiteURL = ""; ################################################################################ # Authorization system LTI: LMS Grade Passback ################################################################################ # WeBWorK can automatically report grades back to your LMS. However the # system is reasonably restrictive. When you create an LTI link in your # LMS you can choose to have that LTI link have a grade associated to it. # WeBWorK can report back a single percentage as the "grade" for that link. # There are two modes under which this can occur. # # Single Course Grade Mode: $LTIGradeMode = "course"; # # In this mode you create a single Link/Assignment which points to your # WeBWorK Course address. E.G. In Blackboard # Name: WeBWorK # URL: https://webwork.university.edu/webwork2/CourseName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a LMS grade associated to the Link/Assignment # which is determined by their percentage total homework grade in WeBWorK. # This total homework grade is the same as the grade that is reported on the # grades page. You can change the weight of sets by altering the weight of # the problems in the set. # # Individual Homework Grade Mode: $LTIGradeMode = "homework"; # # In this mode you create a single Link/Assignment for *every* homework set in # the course. The address should be the address of that set in the Course. # E.G. in Blackboard # Name: Set Name # URL: https://webwork.university.edu/webwork2/CourseName/SetName # Check Yes: This link is to a Tool Provider # Enable Evaluation: Yes # Points Possible: 100 # Students will receive a grade for each Link/Assignment which is determined # by their percentage homework grade on the Set which the Link/Assignment # points to. Students need to use the Link/Assignment in the LMS at least once # to enable grade passback. In particular when working in this mode it is # recommended that you only allow students to log in via the LMS. # # Note: For both of these modes only the grades are passed back. In # particular nothing else about the Link/Assignment in the LMS and the # homework set in WeBWorK is syncronized. In particular the total number of # points/problems, the due dates, the open dates are not kept in sync # automatically. #$LTIGradeMode = "course"; $LTIGradeMode = "homework"; # When set this variable sends grades back to the LMS every time a user # submits an answer. This keeps students grades up to date but can be # a drain on the server. $LTIGradeOnSubmit = 1; # The system periodically updates student grades on the LMS. This # variable controls how often that happens. Set to -1 to disable. #$LTIMassUpdateInterval = 86400; #in seconds $LTIMassUpdateInterval = 300; #in seconds ################################################################################ # Authorization system LTI: LMS Roles Mapped to WeBWorK Roles ################################################################################ # You may need to customize this hash to take into account the roles # that are used in your LMS. Set the debug_lti_parameters flag to see # what roles are being reported to WeBWorK by your LMS %LMSrolesToWeBWorKroles = ( "librarian" => "guest", "observer" => "guest", "visitor" => "guest", "Guest" => "guest", "Designer" => "professor", "instructor" => "professor", "Instructor" => "professor", "Faculty" => "professor", "Teacher" => "professor", "Student" => "student", "Learner" => "student", "student" => "student", "AI/TA" => "ta", "TA" => "ta", "Teaching Assistant" => "ta", "Teaching Assistant (TA)" => "ta", "Non-editing teacher" => "ta", "Grader" => "ta", ); # For security reasons accounts with high permissions should not be auto # created via LTI requests. Set this variable to "professor" if you want # professor accounts to be created automatically #$LTIAccountCreationCutoff = "ta"; $LTIAccountCreationCutoff = "professor"; ################################################################################ # Local routines ################################################################################ # These local routines can be used to modify and override various elements of # the authentication process. ################################################################################ # Local routine to modify users ################################################################################ # When users are added to the system WeBWorK will do its best to fill out # user information. However, institutions can add code to the following # routine to set fields not normally set by WeBWorK. E.G. The student ID # field. #$LTI_modify_user = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # # The user object to be modified # my $user = shift; # # # Parse context_id for additional information. E.G. # my @course_id=split /-/, $self -> {"context_id"}; # $user->{"section"} = $course_id[4]; # }; ################################################################################ # Local routine to modify user sets ################################################################################ # When users are added to the system they are also assigned all visible sets # This routine can be used to modify the sets before they are assigned. E.G. # extend due dates based off the number of problems students have to do #$LTI_modify_user_set = sub { # # The self object from LTIAdvanced.pm # my $self = shift; # my $globalSet = shift; # # The userSet object to be modified # my $userSet = shift; # my $numberOfSetsAssigned = $self->{numberOfSetsAssigned}; # my $daysPerSetMakeup = 2; # my $reasonableNumberOfDays = $numberOfSetsAssigned*$daysPerSetMakeup +1; # if ($reasonableNumberOfDays < 2) {$reasonableNumberOfDays = 2;} # my $niceDueTime = $globalSet->due_date + $reasonableNumberOfDays*86400; # my $niceAnswerTime = $niceDueTime + 600; # $userSet->due_date($niceDueTime); # $userSet->answer_date($niceAnswerTime); #}; 1; #final line of the file to reassure perl that it was read properly. #!perl ################################################################################ # WeBWorK Online Homework Delivery System # Copyright 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/ # # 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.conf 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', ]; ### additional mail overrides # Use this to customize the text of the feedback button. $feedback_button_name = "Email WeBWorK TA"; ################################################################################ # Repository Information ############################################################################### # This is where you put your 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. If your course list page in the admin course is very slow # consider disabling this option. $enableGitUpgradeNotifier = 0; $gitWeBWorKRemoteName = "origin"; $gitWeBWorKBranchName = "master"; $gitPGRemoteName = "origin"; $gitPGBranchName = "master"; $gitLibraryRemoteName = "origin"; $gitLibraryBranchName = "master"; ################################################################################ # Theme ################################################################################ $defaultTheme = "math4"; $defaultThemeTemplate = "system"; ################################################################################ # 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. You should consider changing this to point # to a file which is not tracked by git $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; #$webworkFiles{site_info} = "$webworkDirs{htdocs}/our_site_info.txt"; # The setHeader preceeds 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"; #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default hardcopy only header file #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.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 $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg"; # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default screen HTML only header file # $webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg"; ################################################################################ # NationalProblemLibrary -- OpenProblemLibrary ################################################################################ # For configuration instructions, see: # http://webwork.maa.org/wiki/National_Problem_Library # The directory containing the natinal problem library files. Set to "" if no problem # library is installed. # NationalProblemLibrary (NPL) has been renamed to OpenProblemLibrary (OPL) $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 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; # 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", # ContribDir => "Contrib", 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. $permissionLevels{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 undef setting means that even professor answers are logged and # saved in the past answer database. #$permissionLevels{record_set_version_answers_when_acting_as_student} = "professor"; #$permissionLevels{record_answers_when_acting_as_student} = "professor"; ################################################################################ # 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} = 1; # This sets if mathview is available on the PG editor for use as a minimal latex equation editor $options{PGMathView} = 0; $options{PGWirisEditor} = 0; $options{PGMathQuill} = 0; ################################################################################ # PG subsystem options ################################################################################ # List of enabled display modes. Comment out any modes you don't wish to make # available for use. $pg{displayModes} = [ # "plainText", # display raw TeX for math expressions "images", # display math expressions as images generated by dvipng "MathJax", # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax, and it is requred if you want to use mathview ]; # Default display mode. Should be an uncommented item listed above. $pg{options}{displayMode} = "MathJax"; #$webworkURLs{MathJax} = "$server_root_url/$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; #$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS_CHTML-full"; $webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"; ################################################################################ # 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 ################################################################################ # Configuring the display of different versions of the editors ################################################################################ # These configurations can be placed in course.conf file to tune the behavior for individual courses # These will enable the versions of the problem set detail page and library browser page # that do not use the xmlrpc pathway #$showeditors{problemsetdetail1} = 1; #$showeditors{librarybrowsernojs} = 1; # This will enable the PG problem editor 3 $showeditors{pgproblemeditor3} = 1; $showeditors{pgproblemeditor2} = 0; $showeditors{simplepgeditor} = 0; # This will turn off ww3 #$showeditors{ww3} = 0; # Similar changes can be made in the same way for other editors. # Look at the relevant section of default.config to # see the default settings for each editor. # (The syntax is slightly different there because the configurations # for all of the editors are being set in the configuration hash.) ################################################################################ # 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(TikZ_Image2)]); ################################################################################ # 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=> < # if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) { # MathJax.Hub.Config({ # config: [], # skipStartupTypeset: false # }); # } # # END_PREAMBLE ################################################################################ # Authentication Methods ################################################################################ # Extra modules have been created to allow WeBWorK to use certain external # methods of authentication. ################################################################################ # 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 = 1; #$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. ################################################################################ # 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 Managment 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"; ################################################################################ # 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. $hardcopyThemes = [ qw ( oneColumn twoColumn XeLaTeX-oneColumn XeLaTeX-twoColumn XeLaTeX-Hebrew-oneColumn XeLaTeX-Hebrew-twoColumn )]; # Hardcopy theme names (pretty names for themes) $hardcopyThemeNames = { oneColumn => 'pdfLaTeX - English - One Column', twoColumn => 'pdfLaTeX - English - Two Columns', XeLaTeX-oneColumn => 'XeLaTeX - English - one Column', XeLaTeX-twoColumn => 'XeLaTeX - English - two Columns', XeLaTeX-Hebrew-oneColumn => 'XeLaTeX - Hebrew/English - one Column', XeLaTeX-Hebrew-twoColumn => 'XeLaTeX - Hebrew/English - two Columns', }; # Change default Hardcopy theme - in order to use an XeLaTeX theme, we must set # $externalPrograms{pdflatex} to use xelatex (here or in site.conf) !!! #$hardcopyTheme = "XeLaTeX-twoColumn"; #$externalPrograms{pdflatex} ="/usr/bin/xelatex --shell-escape"; ################################################################################ 1; #final line of the file to reassure perl that it was read properly.