version 1.391, 2021/11/22 23:40:59
|
version 1.392, 2021/11/24 04:25:01
|
Line 6129 sub lti_options {
|
Line 6129 sub lti_options {
|
my (%checked,%rolemaps,$crssecsrc,$userfield,$cidfield,$callback); |
my (%checked,%rolemaps,$crssecsrc,$userfield,$cidfield,$callback); |
$checked{'mapuser'}{'sourcedid'} = ' checked="checked"'; |
$checked{'mapuser'}{'sourcedid'} = ' checked="checked"'; |
$checked{'mapcrs'}{'course_offering_sourcedid'} = ' checked="checked"'; |
$checked{'mapcrs'}{'course_offering_sourcedid'} = ' checked="checked"'; |
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
$checked{'storecrs'}{'Y'} = ' checked="checked"'; |
|
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
$checked{'mapcrstype'} = {}; |
$checked{'mapcrstype'} = {}; |
$checked{'makeuser'} = {}; |
$checked{'makeuser'} = {}; |
$checked{'selfenroll'} = {}; |
$checked{'selfenroll'} = {}; |
Line 6187 sub lti_options {
|
Line 6188 sub lti_options {
|
$checked{'mapcrstype'}{$type} = ' checked="checked"'; |
$checked{'mapcrstype'}{$type} = ' checked="checked"'; |
} |
} |
} |
} |
|
if (!$current->{'storecrs'}) { |
|
$checked{'storecrs'}{'N'} = $checked{'storecrs'}{'Y'}; |
|
$checked{'storecrs'}{'Y'} = ''; |
|
} |
if ($current->{'makecrs'}) { |
if ($current->{'makecrs'}) { |
$checked{'makecrs'}{'Y'} = ' checked="checked"'; |
$checked{'makecrs'}{'Y'} = ' checked="checked"'; |
} |
} |
Line 6294 sub lti_options {
|
Line 6299 sub lti_options {
|
my $onclicklcauth = ' onclick="toggleLTI(this.form,'."'lcauth','$num'".')"'; |
my $onclicklcauth = ' onclick="toggleLTI(this.form,'."'lcauth','$num'".')"'; |
my $onclickmenu = ' onclick="toggleLTI(this.form,'."'lcmenu','$num'".');"'; |
my $onclickmenu = ' onclick="toggleLTI(this.form,'."'lcmenu','$num'".');"'; |
my $output = '<fieldset class="ltioption_usr_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('Logout options').'</legend>'. |
my $output = '<fieldset class="ltioption_usr_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('Logout options').'</legend>'. |
'<div class="LC_floatleft"><span class="LC_nobreak">'.&mt('Callback on logout').': '. |
'<div class="LC_floatleft"><span class="LC_nobreak">'.&mt('Callback to logout LON-CAPA on log out from Consumer').': '. |
'<label><input type="radio" name="lti_callback_'.$num.'" value="0"'. |
'<label><input type="radio" name="lti_callback_'.$num.'" value="0"'. |
$checked{'callback'}{'N'}.$onclickcallback.' />'.&mt('No').'</label>'.(' 'x2). |
$checked{'callback'}{'N'}.$onclickcallback.' />'.&mt('No').'</label>'.(' 'x2). |
'<label><input type="radio" name="lti_callback_'.$num.'" value="1"'. |
'<label><input type="radio" name="lti_callback_'.$num.'" value="1"'. |
Line 6382 sub lti_options {
|
Line 6387 sub lti_options {
|
$checked{'mapcrstype'}{$type}.' />'.$coursetypetitles{$type}.'</label>'. |
$checked{'mapcrstype'}{$type}.' />'.$coursetypetitles{$type}.'</label>'. |
(' 'x2); |
(' 'x2); |
} |
} |
$output .= '</span></fieldset>'. |
$output .= '</span><br /><br />'. |
|
'<span class="LC_nobreak">'.&mt('Store mapping of course identifier to LON-CAPA CourseID').': '. |
|
'<label><input type="radio" name="lti_storecrs_'.$num.'" value="0"'. |
|
$checked{'storecrs'}{'N'}.' />'.&mt('No').'</label>'.(' 'x2). |
|
'<label><input type="radio" name="lti_storecrs_'.$num.'" value="1"'. |
|
$checked{'storecrs'}{'Y'}.' />'.&mt('Yes').'</label></span>'. |
|
'</fieldset>'. |
'<fieldset class="ltioption_crs_'.$num.'" style="display:'.$crssty.'"><legend>'.&mt('Mapping course roles').'</legend><table><tr>'; |
'<fieldset class="ltioption_crs_'.$num.'" style="display:'.$crssty.'"><legend>'.&mt('Mapping course roles').'</legend><table><tr>'; |
foreach my $ltirole (@lticourseroles) { |
foreach my $ltirole (@lticourseroles) { |
my ($selected,$selectnone); |
my ($selected,$selectnone); |
Line 14775 sub modify_lti {
|
Line 14786 sub modify_lti {
|
my @courseroles = ('cc','in','ta','ep','st'); |
my @courseroles = ('cc','in','ta','ep','st'); |
my @ltiroles = qw(Learner Instructor ContentDeveloper TeachingAssistant Mentor Member Manager Administrator); |
my @ltiroles = qw(Learner Instructor ContentDeveloper TeachingAssistant Mentor Member Manager Administrator); |
my @lticourseroles = qw(Instructor TeachingAssistant Mentor Learner); |
my @lticourseroles = qw(Instructor TeachingAssistant Mentor Learner); |
my @coursetypes = ('official','unofficial','community','textbook','placement'); |
my @coursetypes = ('official','unofficial','community','textbook','placement','lti'); |
my %coursetypetitles = &Apache::lonlocal::texthash ( |
my %coursetypetitles = &Apache::lonlocal::texthash ( |
official => 'Official', |
official => 'Official', |
unofficial => 'Unofficial', |
unofficial => 'Unofficial', |
community => 'Community', |
community => 'Community', |
textbook => 'Textbook', |
textbook => 'Textbook', |
placement => 'Placement Test', |
placement => 'Placement Test', |
|
lti => 'LTI Provider', |
); |
); |
my %fieldtitles = &Apache::loncommon::personal_data_fieldtitles(); |
my %fieldtitles = &Apache::loncommon::personal_data_fieldtitles(); |
my %lt = <i_names(); |
my %lt = <i_names(); |
Line 14939 sub modify_lti {
|
Line 14951 sub modify_lti {
|
} |
} |
} |
} |
$confhash{$itemid}{'mapcrstype'} = \@crstypes; |
$confhash{$itemid}{'mapcrstype'} = \@crstypes; |
|
if ($env{'form.lti_storecrs_'.$idx}) { |
|
$confhash{$itemid}{'storecrs'} = 1; |
|
} |
if ($env{'form.lti_makecrs_'.$idx}) { |
if ($env{'form.lti_makecrs_'.$idx}) { |
$confhash{$itemid}{'makecrs'} = 1; |
$confhash{$itemid}{'makecrs'} = 1; |
} |
} |
Line 14983 sub modify_lti {
|
Line 14998 sub modify_lti {
|
} |
} |
unless (($idx eq 'add') || ($changes{$itemid})) { |
unless (($idx eq 'add') || ($changes{$itemid})) { |
if ($confhash{$itemid}{'crsinc'}) { |
if ($confhash{$itemid}{'crsinc'}) { |
foreach my $field ('mapcrs','makecrs','section','passback','roster') { |
foreach my $field ('mapcrs','storecrs','makecrs','section','passback','roster') { |
if ($domconfig{$action}{$itemid}{$field} ne $confhash{$itemid}{$field}) { |
if ($domconfig{$action}{$itemid}{$field} ne $confhash{$itemid}{$field}) { |
$changes{$itemid} = 1; |
$changes{$itemid} = 1; |
} |
} |
Line 15145 sub modify_lti {
|
Line 15160 sub modify_lti {
|
if ($confhash{$itemid}{'callback'}) { |
if ($confhash{$itemid}{'callback'}) { |
$resulttext .= '<li>'.&mt('Callback setting').': '.$confhash{$itemid}{'callback'}.'</li>'; |
$resulttext .= '<li>'.&mt('Callback setting').': '.$confhash{$itemid}{'callback'}.'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('No callback to logout LON-CAPA session when user logs out of Comsumer').'</li>'; |
$resulttext .= '<li>'.&mt('Callback to logout LON-CAPA on log out from Consumer').'</li>'; |
} |
} |
if ($confhash{$itemid}{'mapuser'}) { |
if ($confhash{$itemid}{'mapuser'}) { |
my $shownmapuser; |
my $shownmapuser; |
Line 15234 sub modify_lti {
|
Line 15249 sub modify_lti {
|
$resulttext .= '<li>'.&mt('No mapping to LON-CAPA courses').'</li>'; |
$resulttext .= '<li>'.&mt('No mapping to LON-CAPA courses').'</li>'; |
} |
} |
} |
} |
|
if ($confhash{$itemid}{'storecrs'}) { |
|
$resulttext .= '<li>'.&mt('Store mapping of course identifier to LON-CAPA CourseID').': '.$confhash{$itemid}{'storecrs'}.'</li>'; |
|
} |
if ($confhash{$itemid}{'makecrs'}) { |
if ($confhash{$itemid}{'makecrs'}) { |
$resulttext .= '<li>'.&mt('Instructor may create course (if absent).').'</li>'; |
$resulttext .= '<li>'.&mt('Instructor may create course (if absent).').'</li>'; |
} else { |
} else { |