Skip to content

Commit

Permalink
Merge pull request openwebwork#2589 from Alex-Jordan/allowAccessWithN…
Browse files Browse the repository at this point in the history
…oSourcedID

configuration option to allow students to work on sets that are missi…
  • Loading branch information
drgrice1 authored Nov 11, 2024
2 parents c033f33 + 6dba68b commit 22b6dbf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions conf/authen_LTI_1_3.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,20 @@ $LTI{v1p3}{LMSrolesToWeBWorKroles} = {
# $userSet->answer_date($niceAnswerTime);
#};

################################################################################################
# Miscellaneous
################################################################################################

# When grade passback mode is 'homework', someone must use a set-specific link from the LMS in
# order for grade passback to begin happening for that set. Use of the set-specific link lets
# WeBWorK store the set's "sourced_ID". So if there is no sourced_ID, the default behavior is
# that a user in WeBWorK sees the sets as disabled and there is a message about needing to
# access the set from the LMS. The following option can be set to allow users to work on the set
# anyway. There will be no grade passback until some later time when an LMS user clicks the
# set-specific link. In some LMSs, it is possible for the instructor to activate the link.

$LTI{v1p3}{ignoreMissingSourcedID} = 0;

# Do not change this.
$LTI{v1p3}{grader} = 'WeBWorK::Authen::LTIAdvantage::SubmitGrade';

Expand Down
4 changes: 3 additions & 1 deletion lib/WeBWorK/ContentGenerator/ProblemSets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,14 @@ sub getSetStatus ($c, $set) {
$link_is_active = 0 unless $canViewUnopened;
push(@$other_messages, $c->restricted_progression_msg(0, $set->restricted_status * 100, @restricted));
} elsif (!$canViewUnopened
&& ($ce->{LTIVersion} ne 'v1p3' || !$ce->{LTI}{v1p3}{ignoreMissingSourcedID})
&& defined $ce->{LTIGradeMode}
&& $ce->{LTIGradeMode} eq 'homework'
&& !$set->lis_source_did)
{
# The set shouldn't be shown if LTI grade mode is set to homework and a
# sourced_id is not available to use to send back grades.
# sourced_id is not available to use to send back grades
# (unless we are using LTI 1.3 and $LTI{v1p3}{ignoreMissingSourcedID} is set)
push(
@$other_messages,
$c->maketext(
Expand Down

0 comments on commit 22b6dbf

Please sign in to comment.