Skip to content

Commit

Permalink
Add more configurable LTI variables to config page.
Browse files Browse the repository at this point in the history
Adds LTIGradeOnSubmit, LTIMassUpdateInterval, LTI{v1p1}{BasicConsumerSecret}
to the list of variables that can be configured by a course instructor.
  • Loading branch information
somiaj committed Jun 25, 2024
1 parent fc2cdd5 commit 94f57fb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf/authen_LTI.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ $LTIMassUpdateInterval = 86400; #in seconds
#'LTI{v1p3}{LMS_url}',
#'external_auth',
#'LTIGradeMode',
#'LTIGradeOnSubmit',
#'LTIMassUpdateInterval',
#'LMSManageUserData',
#'LTI{v1p1}{BasicConsumerSecret}',
#'debug_lti_parameters',
#'lms_context_id'
);
Expand Down
29 changes: 29 additions & 0 deletions lib/WeBWorK/ConfigValues.pm
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,25 @@ sub getConfigValues ($ce) {
labels => { '' => 'None', 'course' => 'Course', 'homework' => 'Homework' },
type => 'popuplist'
},
LTIGradeOnSubmit => {
var => 'LTIGradeOnSubmit',
doc => x('Update LMS Grade Each Submit'),
doc2 => x(
'Sets if webwork sends grades back to the LMS every time a user submits an answer. '
. 'This keeps students grades up to date, but can cause additional server load.'
),
type => 'boolean'
},
LTIMassUpdateInterval => {
var => 'LTIMassUpdateInterval',
doc => x('Time in seconds to periodically update LMS grades (-1 to disable)'),
doc2 => x(
'Sets the time in seconds to periodically update the LMS grades. WeBWorK will update all grades on '
. 'the LMS if it has been longer than this time since the completion of the last update. This is '
. 'only an approximate time. 86400 seconds is one day. -1 disables periodic updates.'
),
type => 'number'
},
LMSManageUserData => {
var => 'LMSManageUserData',
doc => x('Allow the LMS to update user account data'),
Expand All @@ -902,6 +921,15 @@ sub getConfigValues ($ce) {
),
type => 'boolean'
},
'LTI{v1p1}{BasicConsumerSecret}' => {
var => 'LTI{v1p1}{BasicConsumerSecret}',
doc => x('Set the shared secret used for the LMS'),
doc2 => x(
'This is a secret word that is used to validate information between WeBWorK and the LMS.'
. 'This secret word must match the word you configure in the LMS.'
),
type => 'text'
},
debug_lti_parameters => {
var => 'debug_lti_parameters',
doc => x('Show LTI parameters (for debugging)'),
Expand Down Expand Up @@ -988,6 +1016,7 @@ sub getConfigValues ($ce) {
{ %{ delete $LTIConfigValues->{'LTI{v1p1}{LMS_name}'} }, var => 'LTI{v1p3}{LMS_name}' };
$LTIConfigValues->{'LTI{v1p3}{LMS_url}'} =
{ %{ delete $LTIConfigValues->{'LTI{v1p1}{LMS_url}'} }, var => 'LTI{v1p3}{LMS_url}' };
delete $LTIConfigValues->{'LTI{v1p1}{BasicConsumerSecret}'};
}

push(
Expand Down

0 comments on commit 94f57fb

Please sign in to comment.