--- loncom/interface/lonmodifycourse.pm 2017/01/05 16:17:11 1.90 +++ loncom/interface/lonmodifycourse.pm 2018/03/23 01:01:21 1.93 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.90 2017/01/05 16:17:11 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.93 2018/03/23 01:01:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -289,10 +289,12 @@ function gochoose(cname,cdom,cdesc) { document.courselist.submit(); } else { var str = ''; + \$("#LC_choose_adhoc").empty(); for (var i=0; i<data.roles.length; i++) { \$("<label><input type='radio' value='"+data.roles[i].name+"' name='LC_get_role' id='LC_get_role_"+i+"' />"+data.roles[i].desc+"</label><span> </span>") .appendTo("#LC_choose_adhoc"); } + \$( "#LC_adhocrole_chooser" ).toggle( true ); \$( "#LC_get_role_0").prop("checked", true); \$( "#LC_adhocrole_chooser" ).dialog({ autoOpen: false }); \$( "#LC_adhocrole_chooser" ).dialog("open"); @@ -338,7 +340,7 @@ function gochoose(cname,cdom,cdesc) { // ]]> </script> -<div id="LC_adhocrole_chooser" title="$lt{'title'}"> +<div id="LC_adhocrole_chooser" title="$lt{'title'}" style="display:none"> <p>$lt{'preamble'}</p> <form name="LChelpdeskadhoc" id="LChelpdeskpicker" action=""> <div id="LC_choose_adhoc"> @@ -1110,7 +1112,7 @@ sub print_course_modification_page { $r->print(&Apache::lonhtmlcommon::row_title( &Apache::loncommon::help_open_topic('Modify_Course_Instcode'). ' '.&mt('Course Code'))."\n". - '<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'"'.$disabled.'/>'. + '<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'"'.$disabled.' />'. &Apache::lonhtmlcommon::row_closure()); if (($crstype eq 'Course') && (&showcredits($cdom))) { $r->print(&Apache::lonhtmlcommon::row_title( @@ -1275,6 +1277,8 @@ sub gather_authenitems { $curr_authtype = 'int'; } elsif ($enrollvar->{'authtype'} eq 'localauth' ) { $curr_authtype = 'loc'; + } elsif ($enrollvar->{'authtype'} eq 'lti' ) { + $curr_authtype = 'lti'; } } unless ($curr_authtype eq '') { @@ -1295,7 +1299,8 @@ sub gather_authenitems { $authform{'krb'} = &Apache::loncommon::authform_kerberos(%param); $authform{'int'} = &Apache::loncommon::authform_internal(%param); $authform{'loc'} = &Apache::loncommon::authform_local(%param); - foreach my $item ('krb','int','loc') { + $authform{'lti'} = &Apache::loncommon::authform_lti(%param); + foreach my $item ('krb','int','loc','lti') { if ($authform{$item} ne '') { $authenitems .= $authform{$item}.'<br />'; } @@ -1361,6 +1366,8 @@ sub modify_course { if ((defined($env{'form.locarg'})) && ($env{'form.locarg'})) { $newattr{'autharg'} = $env{'form.locarg'}; } + } elsif ($env{'form.login'} eq 'lti') { + $newattr{'authtype'} = 'lti'; } if ( $newattr{'authtype'}=~ /^krb/) { if ($newattr{'autharg'} eq '') {