[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Fri Jul 6 18:39:58 EDT 2018


raeburn		Fri Jul  6 22:39:58 2018 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Satisfy w3c validation.
  
  
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.333 loncom/interface/domainprefs.pm:1.334
--- loncom/interface/domainprefs.pm:1.333	Fri Jul  6 13:43:14 2018
+++ loncom/interface/domainprefs.pm	Fri Jul  6 22:39:57 2018
@@ -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 @@
         $output =
             &Apache::lonuserutils::custom_roledefs_js($context,$crstype,$formname,\%full, 
                                                       \@templateroles);
+    } elsif ($action eq 'ltitools') {
+        $output .= &ltitools_javascript($settings);
+    } elsif ($action eq 'lti') {
+        $output .= &lti_javascript($settings);
     }
     $output .=
          '<table class="LC_nested_outer">
@@ -2482,7 +2486,7 @@
         $datatable .= '<option value="'.$k.'"'.$selstr.'>'.$vpos.'</option>';
     }
     $datatable .= '</select> '."\n".
-                  '<input type="checkbox" name="'.$type.'_addbook" value="1" />'.&mt('Add').'</td>'."\n".
+                  '<input type="checkbox" name="'.$type.'_addbook" value="1" />'.&mt('Add').'</span></td>'."\n".
                   '<td colspan="2">'.
                   '<span class="LC_nobreak">'.&mt('Subject:').'<input type="text" size="15" name="'.$type.'_addbook_subject" value="" /></span> '."\n".
                   (' 'x2).
@@ -2499,13 +2503,13 @@
         } else {
             $datatable .= '<input type="file" name="'.$type.'_addbook_image" value="" />';
         }
+        $datatable .= '</span>'."\n";
     }
-    $datatable .= '</span>'."\n".
-                  '<span class="LC_nobreak">'.&mt('LON-CAPA course:').' '.
+    $datatable .= '<span class="LC_nobreak">'.&mt('LON-CAPA course:').' '.
                   &Apache::loncommon::select_dom_form($env{'request.role.domain'},$type.'_addbook_cdom').
                   '<input type="text" size="25" name="'.$type.'_addbook_cnum" value="" />'.
                   &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').
                   '</span></td>'."\n".
                   '</tr>'."\n";
     $itemcount ++;
@@ -3454,7 +3458,7 @@
                     if ($currfield{$field} eq 'no') {
                         $display = ' style="display:none"';
                     }
-                    $datatable .= '</td></tr><tr id="help_screenshotsize"'.$display.' />'.
+                    $datatable .= '</td></tr><tr id="help_screenshotsize"'.$display.'>'.
                                   '<td>'.&mt('Maximum size for upload (MB)').'</td><td>'.
                                   '<input type="text" size="5" name="helpform_maxsize" value="'.$maxsize.'" />';
                 }
@@ -3499,7 +3503,7 @@
                               'value="'.$bccemails{$type}.'"  /></fieldset>'.
                               '<fieldset><legend>'.&mt('Optional added text').'</legend>'.
                               &mt('Text automatically added to e-mail:').' '.
-                              '<input type="text" name="'.$type.'_includestr" value="'.$includestr{$type}.'" /><br >'.
+                              '<input type="text" name="'.$type.'_includestr" value="'.$includestr{$type}.'" /><br />'.
                               '<span class="LC_nobreak">'.&mt('Location:').' '.
                               '<label><input type="radio" name="'.$type.'_includeloc" value="s"'.$locchecked{'s'}.' />'.&mt('in subject').'</label>'.
                               (' 'x2).
@@ -3647,7 +3651,7 @@
                'value="'.$bccemails.'"  /></fieldset>'.
                '<fieldset><legend>'.&mt('Optional added text').'</legend>'.
                &mt('Text automatically added to e-mail:').' '.
-               '<input type="text" name="override_'.$type.'_includestr" value="'.$includestr.'" /><br >'.
+               '<input type="text" name="override_'.$type.'_includestr" value="'.$includestr.'" /><br />'.
                '<span class="LC_nobreak">'.&mt('Location:').' '.
                '<label><input type="radio" name="override_'.$type.'_includeloc" value="s"'.$locchecked{'s'}.' />'.&mt('in subject').'</label>'.
                (' 'x2).
@@ -3776,7 +3780,6 @@
             push(@jsarray,('notinc','notexc'));
         }
         my $hiddenstr = join("','", at jsarray);
-        $datatable .= &helpsettings_javascript(\@roles_by_num,$maxnum,$hiddenstr,$formname);
         my $context = 'domprefs';
         my $crstype = 'Course';
         my $prefix = 'helproles_';
@@ -3879,7 +3882,9 @@
                                                                 \@templateroles,$newcust).
                       &Apache::lonuserutils::custom_role_table('Course',\%full,\%levels,
                                                                \%levelscurrent,$newcust).
-                      '</fieldset></td></tr>';
+                      '</fieldset>'.
+                      &helpsettings_javascript(\@roles_by_num,$maxnum,$hiddenstr,$formname).
+                      '</td></tr>';
         $count ++;
         $$rowtotal += $count;
     }
@@ -4168,7 +4173,7 @@
     my $confname = $dom.'-domainconfig';
     my $switchserver = &check_switchserver($dom,$confname);
     my $maxnum = scalar(keys(%ordered));
-    my $datatable = &ltitools_javascript($settings);
+    my $datatable;
     my %lt = &ltitools_names();
     my @courseroles = ('cc','in','ta','ep','st');
     my @ltiroles = qw(Instructor ContentDeveloper TeachingAssistant Learner);
@@ -4269,9 +4274,9 @@
                               '<input type="text" name="ltitools_'.$dimen.'_'.$i.'" size="5" value="'.$currdisp{$dimen}.'" /></label>'.
                               (' 'x2);
             }
-            $datatable .= '<br />'.
+            $datatable .= '</span><br />'.
                           '<div class="LC_left_float">'.$lt{'linktext'}.'<br />'.
-                          '<input type="text" name="ltitools_linktext_'.$i.'" size="25" value="'.$currdisp{'linktext'}.'" /></label></div>'.
+                          '<input type="text" name="ltitools_linktext_'.$i.'" size="25" value="'.$currdisp{'linktext'}.'" /></div>'.
                           '<div class="LC_left_float">'.$lt{'explanation'}.'<br />'.
                           '<textarea name="ltitools_explanation_'.$i.'" rows="5" cols="40">'.$currdisp{'explanation'}.
                           '</textarea></div><div style=""></div><br />';
@@ -4442,7 +4447,7 @@
         $datatable .= '<option value="'.$k.'"'.$selstr.'>'.$vpos.'</option>';
     }
     $datatable .= '</select> '."\n".
-                  '<input type="checkbox" name="ltitools_add" value="1" />'.&mt('Add').'</td>'."\n".
+                  '<input type="checkbox" name="ltitools_add" value="1" />'.&mt('Add').'</span></td>'."\n".
                   '<td colspan="2">'.
                   '<fieldset><legend>'.&mt('Required settings').'</legend>'.
                   '<span class="LC_nobreak">'.$lt{'title'}.':<input type="text" size="20" name="ltitools_add_title" value="" /></span> '."\n".
@@ -4479,11 +4484,11 @@
                       '<input type="text" name="ltitools_add_'.$dimen.'" size="5" /></label>'.
                       (' 'x2);
     }
-    $datatable .= '<br />'.
+    $datatable .= '</span><br />'.
                   '<div class="LC_left_float">'.$lt{'linktext'}.'<br />'.
-                  '<input type="text" name="ltitools_add_linktext" size="5" /></label></div>'.
+                  '<input type="text" name="ltitools_add_linktext" size="5" /></div>'.
                   '<div class="LC_left_float">'.$lt{'explanation'}.'<br />'.
-                  '<textarea name=ltitools_add_explanation" rows="5" cols="40"></textarea>'.
+                  '<textarea name="ltitools_add_explanation" rows="5" cols="40"></textarea>'.
                   '</div><div style=""></div><br />';
     my %units = (
                   'passback' => 'days',
@@ -4562,7 +4567,7 @@
                   '<label><input type="checkbox" name="ltitools_add_custom" value="1" />'.
                   &mt('Add').'</label></span></td><td><input type="text" name="ltitools_add_custom_name" />'.
                   '</td><td><input type="text" name="ltitools_add_custom_value" /></td></tr>'.
-                  '</table></fieldset></td></tr>'."\n".
+                  '</table></fieldset>'."\n".
                   '</td>'."\n".
                   '</tr>'."\n";
     $itemcount ++;
@@ -4620,7 +4625,7 @@
         }
     }
     my $maxnum = scalar(keys(%ordered));
-    my $datatable = &lti_javascript($settings);
+    my $datatable;
     my %lt = &lti_names();
     if (keys(%ordered)) {
         my @items = sort { $a <=> $b } keys(%ordered);
@@ -4685,7 +4690,7 @@
         $datatable .= '<option value="'.$k.'"'.$selstr.'>'.$vpos.'</option>';
     }
     $datatable .= '</select> '."\n".
-                  '<input type="checkbox" name="lti_add" value="1" />'.&mt('Add').'</td>'."\n".
+                  '<input type="checkbox" name="lti_add" value="1" />'.&mt('Add').'</span></td>'."\n".
                   '<td colspan="2">'.
                   '<fieldset><legend>'.&mt('Required settings').'</legend>'.
                   '<span class="LC_nobreak">'.$lt{'consumer'}.
@@ -4948,7 +4953,7 @@
                    $checked{'mapcrs'}{$option}.$onclickcrs.' />'.$option.'</label>'.
                    ($option eq 'other' ? '' : (' 'x2) );
     }
-    $output .= '</div><div class="LC_floatleft" style="display:'.$crsfieldsty.';" id="lti_crsfield_'.$num.'".>'.
+    $output .= '</span></div><div class="LC_floatleft" style="display:'.$crsfieldsty.';" id="lti_crsfield_'.$num.'">'.
                '<input type="text" name="lti_mapcrsfield_'.$num.'" value="'.$cidfield.'" />'.
                '</div><div style="padding:0;clear:both;margin:0;border:0"></div>'.
                '<span class="LC_nobreak">'.&mt('LON-CAPA course type(s)').': ';
@@ -4976,7 +4981,7 @@
                '<label><input type="radio" name="lti_crssec_'.$num.'" value="0"'.
                $checked{'crssec'}{'N'}.$onclicksec.' />'.&mt('No').'</label>'.(' 'x2).
                '<label><input type="radio" name="lti_crssec_'.$num.'" value="1"'.
-               $checked{'crssec'}{'Y'}.$onclicksec.' />'.&mt('Yes').'</label><span></div>'.
+               $checked{'crssec'}{'Y'}.$onclicksec.' />'.&mt('Yes').'</label></span></div>'.
                '<div class="LC_floatleft" style="display:'.$crssecfieldsty.';" id="lti_crssecfield_'.$num.'">'.
                '<span class="LC_nobreak">'.&mt('From').':<label>'.
                '<input type="radio" name="lti_crssecsrc_'.$num.'" value="course_section_sourcedid"'.
@@ -4984,7 +4989,7 @@
                &mt('Standard field').'</label>'.(' 'x2).
                '<label><input type="radio" name="lti_crssecsrc_'.$num.'" value="other"'.
                $checked{'crssecsrc'}{'other'}.$onclicksecsrc.' />'.&mt('Other').
-               '</label></div><div class="LC_floatleft" style="display:'.$secsrcfieldsty.';" id="lti_secsrcfield_'.$num.'">'.
+               '</label></span></div><div class="LC_floatleft" style="display:'.$secsrcfieldsty.';" id="lti_secsrcfield_'.$num.'">'.
                '<input type="text" name="lti_customsection_'.$num.'" value="'.$crssecsrc.'" />'.
                '</div><div style="padding:0;clear:both;margin:0;border:0"></div>'; 
     foreach my $extra ('passback','roster') {
@@ -5002,19 +5007,19 @@
                    '<label><input type="radio" name="lti_'.$extra.'_'.$num.'" value="1"'.$checkedon.' />'.
                    &mt('Yes').'</label><br />';
     }
-    $output .= '</span></fieldset>'.
+    $output .= '</fieldset>'.
                '<fieldset><legend>'.&mt('Course defaults (Course Coordinator can override)').'</legend>'.
                '<div class="LC_floatleft"><span class="LC_nobreak">'.$lt{'topmenu'}.': '.
                '<label><input type="radio" name="lti_topmenu_'.$num.'" value="0"'.
                $checked{'topmenu'}{'N'}.$onclickmenu.' />'.&mt('No').'</label>'.(' 'x2).
                '<label><input type="radio" name="lti_topmenu_'.$num.'" value="1"'.
-               $checked{'topmenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').'</label><span></div>'.
+               $checked{'topmenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').'</label></span></div>'.
                '<div style="padding:0;clear:both;margin:0;border:0"></div>'.
                '<div class="LC_floatleft"><span class="LC_nobreak">'.$lt{'inlinemenu'}.': '.
                '<label><input type="radio" name="lti_inlinemenu_'.$num.'" value="0"'.
                $checked{'inlinemenu'}{'N'}.$onclickmenu.' />'.&mt('No').'</label>'.(' 'x2).
                '<label><input type="radio" name="lti_inlinemenu_'.$num.'" value="1"'.
-               $checked{'inlinemenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').'</label><span></div>';
+               $checked{'inlinemenu'}{'Y'}.$onclickmenu.' />'.&mt('Yes').'</label></span></div>';
      $output .='<div style="padding:0;clear:both;margin:0;border:0"></div>'. 
                '<div class="LC_floatleft" style="display:'.$menusty.';" id="lti_menufield_'.$num.'">'.
                '<span class="LC_nobreak">'.&mt('Menu items').': ';
@@ -5023,7 +5028,7 @@
                    $checked{'menuitem'}{$type}.' />'.$menutitles{$type}.'</label>'.
                    (' 'x2);
     }
-    $output .= '</span></fieldset>';
+    $output .= '</span></div></fieldset>';
 #        '<fieldset><legend>'.&mt('Assigning author roles').'</legend>';
 #
 #    $output .= '</fieldset>'.
@@ -5519,7 +5524,7 @@
                               '</label></span> ';
             }
         } elsif ($item eq 'markup') {
-            $datatable .= '<textarea name="'.$caller.'_validation_markup" cols="50" rows="5" wrap="soft">'.
+            $datatable .= '<textarea name="'.$caller.'_validation_markup" cols="50" rows="5">'.
                            $currvalidation{$item}.
                               '</textarea>';
         }
@@ -5541,7 +5546,7 @@
         my ($numdc,$dctable,$rows) = &active_dc_picker($dom,$numinrow,'radio',
                                                        'validationdc',%currhash);
         my $css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
-        $datatable .= '</td></tr><tr'.$css_class.'><td>';
+        $datatable .= '<tr'.$css_class.'><td>';
         if ($numdc > 1) {
             $datatable .= &mt('Course creation processed as: (choose Dom. Coord.)');
         } else {
@@ -6844,7 +6849,7 @@
         $datatable .= '<tr'.$css_class.'>'.
                      '<td class="LC_left_item">'.&mt('Mapping of Shibboleth environment variable names to user data fields (SSO auth)').'</td>'.
                      '<td class="LC_left_item">'."\n".
-                     '<table><tr><td>'."\n";
+                     '<table>'."\n";
         for (my $i=0; $i<@fields; $i++) {
             $rem = $i%($numperrow);
             if ($rem == 0) {
@@ -8251,7 +8256,7 @@
                       '<span class="LC_nobreak">'.
                       '<input type="text" name="'.$type.'_machines" '.
                       'value="'.$machineaccess{$type}.'" size="10" />'.
-                      '</td></tr>'."\n";
+                      '</span></td></tr>'."\n";
     }
     $$rowtotal += $rownum;
     return $datatable;
@@ -8844,7 +8849,7 @@
         }
         $output .= ' ';  
     } else {
-        if (($rem == 0) && (@{$types} > 0)) {
+        if ($rem == 0) {
             $output .= '<tr>';
         }
         if ($colsleft > 1) {


More information about the LON-CAPA-cvs mailing list