--- loncom/interface/domainprefs.pm 2018/07/06 13:43:14 1.333 +++ loncom/interface/domainprefs.pm 2018/07/06 22:39:57 1.334 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.333 2018/07/06 13:43:14 raeburn Exp $ +# $Id: domainprefs.pm,v 1.334 2018/07/06 22:39:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -781,6 +781,10 @@ sub print_config_box { $output = &Apache::lonuserutils::custom_roledefs_js($context,$crstype,$formname,\%full, \@templateroles); + } elsif ($action eq 'ltitools') { + $output .= <itools_javascript($settings); + } elsif ($action eq 'lti') { + $output .= <i_javascript($settings); } $output .= ' @@ -2482,7 +2486,7 @@ sub print_textbookcourses { $datatable .= ''; } $datatable .= ' '."\n". - ''.&mt('Add').''."\n". + ''.&mt('Add').''."\n". ''."\n". ''."\n"; $itemcount ++; @@ -3454,7 +3458,7 @@ sub print_contacts { if ($currfield{$field} eq 'no') { $display = ' style="display:none"'; } - $datatable .= ''. + $datatable .= ''. ''; + ''. + &helpsettings_javascript(\@roles_by_num,$maxnum,$hiddenstr,$formname). + ''; $count ++; $$rowtotal += $count; } @@ -4168,7 +4173,7 @@ sub print_ltitools { my $confname = $dom.'-domainconfig'; my $switchserver = &check_switchserver($dom,$confname); my $maxnum = scalar(keys(%ordered)); - my $datatable = <itools_javascript($settings); + my $datatable; my %lt = <itools_names(); my @courseroles = ('cc','in','ta','ep','st'); my @ltiroles = qw(Instructor ContentDeveloper TeachingAssistant Learner); @@ -4269,9 +4274,9 @@ sub print_ltitools { ''. (' 'x2); } - $datatable .= '
'. + $datatable .= '
'. '
'.$lt{'linktext'}.'
'. - '
'. + ''. '
'.$lt{'explanation'}.'
'. '

'; @@ -4442,7 +4447,7 @@ sub print_ltitools { $datatable .= ''; } $datatable .= ' '."\n". - ''.&mt('Add').''."\n". + ''.&mt('Add').''."\n". ''. - '
'. ''.&mt('Subject:').' '."\n". (' 'x2). @@ -2499,13 +2503,13 @@ sub print_textbookcourses { } else { $datatable .= ''; } + $datatable .= ''."\n"; } - $datatable .= ''."\n". - ''.&mt('LON-CAPA course:').' '. + $datatable .= ''.&mt('LON-CAPA course:').' '. &Apache::loncommon::select_dom_form($env{'request.role.domain'},$type.'_addbook_cdom'). ''. &Apache::loncommon::selectcourse_link - ('display',$type.'_addbook_cnum',$type.'_addbook_cdom',undef,undef,undef,'Course'); + ('display',$type.'_addbook_cnum',$type.'_addbook_cdom',undef,undef,undef,'Course'). '
'.&mt('Maximum size for upload (MB)').''. ''; } @@ -3499,7 +3503,7 @@ sub print_contacts { 'value="'.$bccemails{$type}.'" />'. '
'.&mt('Optional added text').''. &mt('Text automatically added to e-mail:').' '. - '
'. + '
'. ''.&mt('Location:').' '. ''. (' 'x2). @@ -3647,7 +3651,7 @@ sub overridden_helpdesk { 'value="'.$bccemails.'" />
'. '
'.&mt('Optional added text').''. &mt('Text automatically added to e-mail:').' '. - '
'. + '
'. ''.&mt('Location:').' '. ''. (' 'x2). @@ -3776,7 +3780,6 @@ sub print_helpsettings { push(@jsarray,('notinc','notexc')); } my $hiddenstr = join("','",@jsarray); - $datatable .= &helpsettings_javascript(\@roles_by_num,$maxnum,$hiddenstr,$formname); my $context = 'domprefs'; my $crstype = 'Course'; my $prefix = 'helproles_'; @@ -3879,7 +3882,9 @@ sub print_helpsettings { \@templateroles,$newcust). &Apache::lonuserutils::custom_role_table('Course',\%full,\%levels, \%levelscurrent,$newcust). - '
'. '
'.&mt('Required settings').''. ''.$lt{'title'}.': '."\n". @@ -4479,11 +4484,11 @@ sub print_ltitools { ''. (' 'x2); } - $datatable .= '
'. + $datatable .= '
'. '
'.$lt{'linktext'}.'
'. - '
'. + ''. '
'.$lt{'explanation'}.'
'. - ''. + ''. '

'; my %units = ( 'passback' => 'days', @@ -4562,7 +4567,7 @@ sub print_ltitools { '
'. '
'."\n". + ''."\n". ''."\n". ''."\n"; $itemcount ++; @@ -4620,7 +4625,7 @@ sub print_lti { } } my $maxnum = scalar(keys(%ordered)); - my $datatable = <i_javascript($settings); + my $datatable; my %lt = <i_names(); if (keys(%ordered)) { my @items = sort { $a <=> $b } keys(%ordered); @@ -4685,7 +4690,7 @@ sub print_lti { $datatable .= ''; } $datatable .= ' '."\n". - ''.&mt('Add').''."\n". + ''.&mt('Add').''."\n". ''. '
'.&mt('Required settings').''. ''.$lt{'consumer'}. @@ -4948,7 +4953,7 @@ sub lti_options { $checked{'mapcrs'}{$option}.$onclickcrs.' />'.$option.''. ($option eq 'other' ? '' : (' 'x2) ); } - $output .= '
'. + $output .= '
'. ''. '
'. ''.&mt('LON-CAPA course type(s)').': '; @@ -4976,7 +4981,7 @@ sub lti_options { ''.(' 'x2). ''. + $checked{'crssec'}{'Y'}.$onclicksec.' />'.&mt('Yes').''. '
'. ''.&mt('From').':
'. + '
'. ''. '
'; foreach my $extra ('passback','roster') { @@ -5002,19 +5007,19 @@ sub lti_options { '
'; } - $output .= '
'. + $output .= ''. '
'.&mt('Course defaults (Course Coordinator can override)').''. '
'.$lt{'topmenu'}.': '. ''.(' 'x2). '
'. + $checked{'topmenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').''. '
'. '
'.$lt{'inlinemenu'}.': '. ''.(' 'x2). '
'; + $checked{'inlinemenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').''; $output .='
'. '
'. ''.&mt('Menu items').': '; @@ -5023,7 +5028,7 @@ sub lti_options { $checked{'menuitem'}{$type}.' />'.$menutitles{$type}.''. (' 'x2); } - $output .= '
'; + $output .= ''; # '
'.&mt('Assigning author roles').''; # # $output .= '
'. @@ -5519,7 +5524,7 @@ sub print_validation_rows { ' '; } } elsif ($item eq 'markup') { - $datatable .= ''; } @@ -5541,7 +5546,7 @@ sub print_validation_rows { my ($numdc,$dctable,$rows) = &active_dc_picker($dom,$numinrow,'radio', 'validationdc',%currhash); my $css_class = $itemcount%2 ? ' class="LC_odd_row"' : ''; - $datatable .= ''; + $datatable .= ''; if ($numdc > 1) { $datatable .= &mt('Course creation processed as: (choose Dom. Coord.)'); } else { @@ -6844,7 +6849,7 @@ sub print_selfcreation { $datatable .= ''. ''.&mt('Mapping of Shibboleth environment variable names to user data fields (SSO auth)').''. ''."\n". - '
'."\n"; + ''."\n"; for (my $i=0; $i<@fields; $i++) { $rem = $i%($numperrow); if ($rem == 0) { @@ -8251,7 +8256,7 @@ sub print_serverstatuses { ''. ''. - ''."\n"; + ''."\n"; } $$rowtotal += $rownum; return $datatable; @@ -8844,7 +8849,7 @@ sub insttypes_row { } $output .= ' '; } else { - if (($rem == 0) && (@{$types} > 0)) { + if ($rem == 0) { $output .= ''; } if ($colsleft > 1) {