[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm londocs.pm lonextresedit.pm

raeburn raeburn at source.lon-capa.org
Tue Apr 21 03:30:28 EDT 2026


raeburn		Tue Apr 21 07:30:28 2026 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonextresedit.pm londocs.pm 
  Log:
  - WCAG 2.2 compliance
    - Include landmark for page's main content to support "Skip to main content".
    - Include labels for form elements.
    - Satisfy minimum spacing between touch targets.
    - Use <th> tags for column headings and row headings in data table
        with scope="row" attribute for latter.
    - For form elements in data table cells use aria-labelledby to reference 
        appropriate column and row headers.
    - Group form elements in fieldset with legend for screenreaders.
    - Contrast ratio of at least 4.5:1 for normal text.
    - Replace use of <table> with <div> for layout.
    - Eliminate duplicate links by wrapping resource icon and title in a single
      <a> </a>.
    - Eliminate redundant alt attributes for icons by setting alt="".
  
  
-------------- next part --------------
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1515 loncom/interface/loncommon.pm:1.1516
--- loncom/interface/loncommon.pm:1.1515	Sun Apr 19 03:47:18 2026
+++ loncom/interface/loncommon.pm	Tue Apr 21 07:30:27 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1515 2026/04/19 03:47:18 raeburn Exp $
+# $Id: loncommon.pm,v 1.1516 2026/04/21 07:30:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2326,10 +2326,12 @@
         next if ($key eq '/');
         $output .= '<option value="'.$key.'">'.$key.'</option>'."\n";
     }
-    $output .= '</select></label><br /><label>'."\n".
+    $output .= '</select></label><br />'.
+               '<div style="display: inline-block; margin: 2px 0 0 0; padding: 0;">'.
+               '<label>'."\n".
                $lt{'fnam'}.': <select id="'.$secondselectname.'" name="'.$secondselectname.'">'."\n".
                '<option value="" selected="selected"></option>'."\n".
-               '</select></label>'."\n".
+               '</select></label></div>'."\n".
                '<input type="hidden" id="crsres_include_'.$suffix.'" value="'.$only.'" />';
     return ($numdirs,$output);
 }
@@ -8772,7 +8774,8 @@
 }
 
 table.LC_data_table tr > td.LC_docs_entry_commands,
-table.LC_data_table tr > td.LC_docs_entry_parameter {
+table.LC_data_table tr > td.LC_docs_entry_parameter,
+div.LC_docs_entry_parameter {
   font-size: x-small;
 }
 
@@ -8789,7 +8792,7 @@
 }
 
 .LC_docs_rename {
-  color: #009900;
+  color: #007400;
 }
 
 .LC_docs_remove {
@@ -8807,6 +8810,10 @@
   font-size: x-small;
 }
 
+div.LC_exttool_edit {
+  line-height: 205%;
+}
+
 table.LC_docs_adddocs td,
 table.LC_docs_adddocs th {
   border: 1px solid #BBBBBB;
@@ -9627,24 +9634,28 @@
   font-size: 100%;
 }
 
-table.LC_resourceList tr.LC_odd_row th {
+table.LC_resourceList tr.LC_odd_row th,
+table#contentlist tr.LC_odd_row th {
   background-color: $data_table_light;
 }
 
-table.LC_resourceList tr.LC_even_row th {
+table.LC_resourceList tr.LC_even_row th,
+table#contentlist tr.LC_even_row th {
   background-color: $data_table_dark;
 }
 
-
 table.LC_resourceList tr.LC_odd_row th.LC_colheader {
   background-color: $data_table_head;
 }
 
-table.LC_resourceList tr th.LC_rowheader {
+table.LC_resourceList tr th.LC_rowheader,
+table#contentlist tr.LC_odd_row th.LC_rowheader,
+table#contentlist tr.LC_even_row th.LC_rowheader {
   font-weight: normal;
   color: $font;
   text-align: left;
   font-size: 100%;
+  vertical-align: top;
 }
 
 table.LC_resourceList tr.LC_odd_row td.LC_colheader {
Index: loncom/interface/lonextresedit.pm
diff -u loncom/interface/lonextresedit.pm:1.39 loncom/interface/lonextresedit.pm:1.40
--- loncom/interface/lonextresedit.pm:1.39	Sat Dec 20 00:16:36 2025
+++ loncom/interface/lonextresedit.pm	Tue Apr 21 07:30:27 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: lonextresedit.pm,v 1.39 2025/12/20 00:16:36 raeburn Exp $
+# $Id: lonextresedit.pm,v 1.40 2026/04/21 07:30:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -739,9 +739,10 @@
                              '<input type="radio" name="'.$toolradio.'" value="'.$type.'"'.$defcheck{$type}.
                              $typeclick.$disabled.' />'.$typedesc{$type}.'</label></span> '."\n";
             }
+            my $arialabel = &mt('Choose External Tool');
             $toolelem .= '<div id="'.$exttypeon.'" style="'.$exttypeonsty.'">'.
                          '<select name="exttoolid" onchange="javascript:updateExttool(this,'.
-                         'this.form,'."'$supplementalflag'".');"'.$disabled.'>'."\n".
+                         'this.form,'."'$supplementalflag'".');"'.$disabled.' aria-label="'.$arialabel.'">'."\n".
                          $seloptions.
                          '</select><br /></div>'."\n".
                          '<div id="'.$exttypeoff.'" style="'.$exttypeoffsty.'">'.
@@ -772,14 +773,14 @@
                     '<input type="text" id="'.$toolattr{'crsappend'}.'" size="30" name="exttoolappend" value="'.$crsappend.'"'.$disabled.' /></label>'.
                     '</div>'."\n".
                     '<div style="padding:0;clear:both;margin:0;border:0"></div>'.
-                    '<div id="'.$toolattr{'desturldiv'}.'" style="'.$desturlstyle.'">'.
+                    '<div id="'.$toolattr{'desturldiv'}.'" style="'.$desturlstyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'">'.&mt('Post-login destination different from path').': '.
                     '<label><input type="radio" name="exttooldest" value="0"'.$chknodest.$disabled.$onclickdest.' />'.
                     &mt('No').'</label>'.(' 'x2).
                     '<label><input type="radio" name="exttooldest" value="1"'.$chkdest.$disabled.$onclickdest.' />'.
                     &mt('Yes').'</label>'.(' 'x2).
                     '</span><br />'."\n".
-                    '<div id="'.$toolattr{'desturlinfodiv'}.'" style="'.$desturlinfostyle.'">'.
+                    '<div id="'.$toolattr{'desturlinfodiv'}.'" style="'.$desturlinfostyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'">'.
                     '<input type="text" size="'.$size.'" name="exttooldesturl" value="'.$desturl.'"'.$disabled.' aria-label="'.&mt('post-login destination url').'" /></span><br />'.
                     '<span class="'.$class.'"><label>'.&mt('Delay between login and redirect').
@@ -816,21 +817,21 @@
                     '<textarea rows="'.$rows.'" cols="'.$cols.'" id="'.$toolattr{'explanation'}.'" name="exttoolexplanation" '.$disabled.'>'.
                     $explanation.'</textarea></label></div><div style="padding:0;clear:both;margin:0;border:0"></div>'.
                     '</div>'.
-                    '<div id="'.$toolattr{'crslabeldiv'}.'" style="'.$labelstyle.'">'.
+                    '<div id="'.$toolattr{'crslabeldiv'}.'" style="'.$labelstyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'"><label>'.&mt('Course label:').' '.
                     '<input type="text" id="'.$toolattr{'crslabel'}.'" name="exttoollabel" value="'.$crslabel.'"'.$disabled.' /></label></span><br />'.
                     '</div>'."\n".
-                    '<div id="'.$toolattr{'crstitlediv'}.'" style="'.$titlestyle.'">'.
+                    '<div id="'.$toolattr{'crstitlediv'}.'" style="'.$titlestyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'"><label>'.&mt('Course title:').' '.
                     '<input type="text" id="'.$toolattr{'crstitle'}.'" name="exttooltitle" value="'.$crstitle.'"'.$disabled.' /></label></span><br />'.
                     '</div>'."\n".
-                    '<div id="'.$toolattr{'gradablediv'}.'" style="'.$gradablestyle.'">'.
+                    '<div id="'.$toolattr{'gradablediv'}.'" style="'.$gradablestyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'">'.&mt('Gradable').' '.
                     '<label><input type="radio" name="exttoolgradable" value="1"'.$chkgrd.$disabled.
                     ' />'.&mt('Yes').'</label>'.(' 'x2).
                     '<label><input type="radio" name="exttoolgradable" value="0"'.$chknogrd.$disabled.
                     ' />'.&mt('No').'</label></span><br /></div>'."\n".
-                    '<div id="'.$toolattr{'returnurldiv'}.'" style="'.$returnurlstyle.'">'.
+                    '<div id="'.$toolattr{'returnurldiv'}.'" style="'.$returnurlstyle.'" class="LC_exttool_edit">'.
                     '<span class="'.$class.'">'.&mt('Include return URL').': '.
                     '<label><input type="radio" name="exttoolreturnurl" value="none"'.$chknoreturn.$disabled.$onclickreturl.' />'.
                     &mt('No').'</label>'.(' 'x2).
@@ -874,6 +875,7 @@
 <input type="hidden" name="importdetail" value="" />
 $pathitem
 $hiddenelem
+<br />
 <input type="button" value="$save" onclick="javascript:setExternal(this.form,'$residx','$type','$orig_url','$supplementalflag');" $disabled />
 </span>
 </div>
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.739 loncom/interface/londocs.pm:1.740
--- loncom/interface/londocs.pm:1.739	Mon Apr 20 23:26:24 2026
+++ loncom/interface/londocs.pm	Tue Apr 21 07:30:27 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.739 2026/04/20 23:26:24 raeburn Exp $
+# $Id: londocs.pm,v 1.740 2026/04/21 07:30:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4827,7 +4827,7 @@
                               $coursenum,$coursedom,$crstype,
                               $pathitem,$supplementalflag,$container,
                               \%filters,\%curr_groups,$ltitoolsref,$canedit,
-                              $isencrypted,$ishidden,$navmapref,$hostname);
+                              $isencrypted,$ishidden,$navmapref,$hostname,$shown);
         $idx++;
         $shown++;
     }
@@ -4859,10 +4859,10 @@
                 $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')
                           .&Apache::loncommon::start_data_table(undef,'contentlist')
                           .&Apache::loncommon::start_data_table_header_row()
-                          .'<th colspan="2">'.&mt('Move').'</th>'
-                          .'<th colspan="3">'.&mt('Actions').'</th>'
-                          .'<th>'.&mt('Document').'</th>'
-                          .'<th colspan="2">'.&mt('Settings').'</th>'
+                          .'<th colspan="2" id="col1">'.&mt('Move').'</th>'
+                          .'<th colspan="2" id="col2">'.&mt('Actions').'</th>'
+                          .'<th id="col3">'.&mt('Document').'</th>'
+                          .'<th colspan="2" id="col4">'.&mt('Settings').'</th>'
                           .&Apache::loncommon::end_data_table_header_row();
                 if ($folder !~ /^supplemental/) {
                     $lists{'canhide'} = join(',', at allidx);
@@ -4889,7 +4889,8 @@
                                 '<td>'.
                                 &multiple_check_form('actions',\%lists,$canedit).
                                 '</td>'.
-                                '<td colspan="3"> </td>'.
+                                '<td> </td>'.
+                                '<td> </td>'.
                                 '<td colspan="2">'.
                                 &multiple_check_form('settings',\%lists,$canedit).
                                 '</td>'.
@@ -4906,7 +4907,7 @@
                 $to_show .= $toolslink
                            .&Apache::loncommon::start_data_table('LC_tableOfContent')
                            .&Apache::loncommon::start_data_table_header_row('LC_visually_hidden')
-                           .'<th>'.&mt('Resource Type (Icon)').'</th><th>'.&mt('Resource or Folder').'</th>'
+                           .'<th>'.&mt('Resource or Folder').'</th>'
                            .&Apache::loncommon::end_data_table_header_row()
                            .$output.' '
                            .&Apache::loncommon::end_data_table();
@@ -4927,18 +4928,23 @@
                        .'</div>';
         }
     } else {
+        $to_show = '<div class="LC_landmark" role="main" id="LC_main_content">';
         if ($shown) {
-            $to_show = '<div>'
-                      .&Apache::loncommon::start_data_table('LC_tableOfContent')
-                      .$output
-                      .&Apache::loncommon::end_data_table()
-                      .'</div>';
-        } else {
-            $to_show = '<div class="LC_info" id="contentlist">'
-                      .&mt('Currently empty')
-                      .'<br /><br />'
-                      .'</div>'
+            $to_show .= '<div>'
+                       .&Apache::loncommon::start_data_table('LC_tableOfContent')
+                       .&Apache::loncommon::start_data_table_header_row('LC_visually_hidden')
+                       .'<th>'.&mt('Resource or Folder').'</th>'
+                       .&Apache::loncommon::end_data_table_header_row()
+                       .$output
+                       .&Apache::loncommon::end_data_table()
+                       .'</div>';
+        } else {
+            $to_show .= '<div class="LC_info" id="contentlist">'
+                       .&mt('Currently empty')
+                       .'<br /><br />'
+                       .'</div>';
         }
+        $to_show .= '</div>';
     }
     my $tid = 1;
     if ($supplementalflag) {
@@ -4966,43 +4972,48 @@
     }
     my $output =
     '<form action="/adm/coursedocs" method="post" name="togglemult'.$caller.'">'.
+    '<fieldset class="LC_borderless"><legend class="LC_visually_hidden">'.&mt('Switch between single or multiple actions').'</legend>'.
     '<span class="LC_nobreak" style="font-size:x-small;font-weight:bold;">'.
-    '<label><input type="radio" name="showmultpick" value="0" onclick="javascript:togglePick('."'$caller','0'".');" checked="checked" />'.&mt('one').'</label>'.(' 'x2).'<label><input type="radio" name="showmultpick" value="1" onclick="javascript:togglePick('."'$caller','1'".');" />'.&mt('multiple').'</label></span><span id="more'.$caller.'" class="LC_nobreak LC_docs_ext_edit"></span></form>'.
+    '<label><input type="radio" name="showmultpick" value="0" onclick="javascript:togglePick('."'$caller','0'".');" checked="checked" />'.&mt('one').'</label>'.(' 'x2).'<label><input type="radio" name="showmultpick" value="1" onclick="javascript:togglePick('."'$caller','1'".');" />'.&mt('multiple').'</label></span><span id="more'.$caller.'" class="LC_nobreak LC_docs_ext_edit"></span></fieldset></form>'.
     '<div id="multi'.$caller.'" style="display:none;margin:0;padding:0;border:0">'.
     '<form action="/adm/coursedocs" method="post" name="cumulative'.$caller.'">'."\n".
     '<fieldset id="allfields'.$caller.'" style="display:none"><legend style="font-size:x-small;">'.&mt('check/uncheck all').'</legend>'."\n";
     if ($caller eq 'settings') {
-        $output .= 
-            '<table><tr>'.
-            '<td class="LC_docs_entry_parameter">'.
+        $output .=
+            '<div role="grid" class="LC_grid" style="margin: 0">'.
+            '<div role="row" class="LC_grid_row">'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
             '<span class="LC_nobreak"><label>'.
             '<input type="checkbox" name="hiddenresourceall" id="hiddenresourceall" onclick="propagateState(this.form,'."'hiddenresource'".')"'.$disabled.' />'.&mt('Hidden').
-            '</label></span></td>'.
-            '<td class="LC_docs_entry_parameter">'.
+            '</label></span></div>'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
             '<span class="LC_nobreak"><label><input type="checkbox" name="randompickall" id="randompickall" onclick="updatePick(this.form,'."'all','check'".');propagateState(this.form,'."'randompick'".');propagateState(this.form,'."'rpicknum'".');"'.$disabled.' />'.&mt('Randomly Pick').'</label><span id="rpicktextall"></span><input type="hidden" name="rpicknumall" id="rpicknumall" value="" />'.
-            '</span></td>'.
-            '</tr>'."\n".
-            '<tr>'.
-            '<td class="LC_docs_entry_parameter">'.
-            '<span class="LC_nobreak"><label><input type="checkbox" name="encrypturlall" id="encrypturlall" onclick="propagateState(this.form,'."'encrypturl'".')"'.$disabled.' />'.&mt('URL hidden').'</label></span></td><td class="LC_docs_entry_parameter"><span class="LC_nobreak"><label><input type="checkbox" name="randomorderall" id="randomorderall" onclick="propagateState(this.form,'."'randomorder'".')"'.$disabled.' />'.&mt('Random Order').
-            '</label></span>'.
-            '</td></tr></table>'."\n";
+            '</span></div>'.
+            '</div>'."\n".
+            '<div role="row" class="LC_grid_row">'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
+            '<span class="LC_nobreak"><label><input type="checkbox" name="encrypturlall" id="encrypturlall" onclick="propagateState(this.form,'."'encrypturl'".')"'.$disabled.' />'.&mt('URL hidden').'</label></span></div>'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
+	    '<span class="LC_nobreak"><label><input type="checkbox" name="randomorderall" id="randomorderall" onclick="propagateState(this.form,'."'randomorder'".')"'.$disabled.' />'.&mt('Random Order').
+            '</label></span></div>'.
+            '</div></div>'."\n";
     } else {
         $output .=
-            '<table><tr>'.
-            '<td class="LC_docs_entry_parameter">'.
+            '<div role="grid" class="LC_grid" style="margin: 0">'.
+            '<div role="row" class="LC_grid_row">'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
             '<span class="LC_nobreak LC_docs_remove">'.
             '<label><input type="checkbox" name="removeall" id="removeall" onclick="propagateState(this.form,'."'remove'".')"'.$disabled.' />'.&mt('Remove').
-            '</label></span></td>'.
-            '<td class="LC_docs_entry_parameter">'.
+            '</label></span></div>'.
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
             '<span class="LC_nobreak LC_docs_cut">'.
             '<label><input type="checkbox" name="cut" id="cutall" onclick="propagateState(this.form,'."'cut'".');"'.$disabled.' />'.&mt('Cut').
-            '</label></span></td>'."\n".
-            '<td class="LC_docs_entry_parameter">'.
+            '</label></span></div>'."\n".
+            '<div role="gridcell" class="LC_grid_cell LC_docs_entry_parameter">'.
             '<span class="LC_nobreak LC_docs_copy">'.
             '<label><input type="checkbox" name="copyall" id="copyall" onclick="propagateState(this.form,'."'copy'".')"'.$disabled.' />'.&mt('Copy').
-            '</label></span></td>'.
-            '</tr></table>'."\n";
+            '</label></span></div>'.
+            '</div></div>'."\n";
     }
     $output .= 
         '</fieldset>'.
@@ -5214,7 +5225,7 @@
 sub entryline {
     my ($index,$title,$url,$folder,$allowed,$residx,$coursenum,$coursedom,
         $crstype,$pathitem,$supplementalflag,$container,$filtersref,$currgroups,
-        $ltitoolsref,$canedit,$isencrypted,$ishidden,$navmapref,$hostname)=@_;
+        $ltitoolsref,$canedit,$isencrypted,$ishidden,$navmapref,$hostname,$shown)=@_;
     my ($foldertitle,$renametitle,$oldtitle,$encodedtitle);
     if (&is_supplemental_title($title)) {
 	($title,$foldertitle,$renametitle) = &Apache::loncommon::parse_supplemental_title($title);
@@ -5295,7 +5306,7 @@
 	     ne '')) {
 	    $selectbox=
 		'<input type="hidden" name="currentpos" value="'.$incindex.'" />'.
-		'<select name="newpos" onchange="this.form.submit()"'.$disabled.'>';
+		'<select name="newpos" onchange="this.form.submit()"'.$disabled.' aria-labelledby="col1 row'.$shown.'">';
 	    for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) {
 		if ($i==$incindex) {
 		    $selectbox.='<option value="" selected="selected">('.$i.')</option>';
@@ -5415,12 +5426,12 @@
         }
 	$line.=(<<END);
 <td>
-<div class="LC_docs_entry_move">
+<div class="LC_docs_entry_move" style="margin-bottom: 3px;">
   <a href="$uplink">
     <img src="${iconpath}move_up.gif" alt="$lt{'up'}" class="LC_icon" />
   </a>
 </div>
-<div class="LC_docs_entry_move">
+<div class="LC_docs_entry_move" style="margin-top: 3px;">
   <a href="$downlink">
     <img src="${iconpath}move_down.gif" alt="$lt{'dw'}" class="LC_icon" />
   </a>
@@ -5775,7 +5786,7 @@
     if ($allowed) {
         $line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink.'</span>';
         if ($orig_url =~ /$LONCAPA::assess_re/) {
-            $line.= '<br />';
+            $line.= '<br /><div style="display: inline-block; margin: 7px 0 0 0; padding: 0;">';
             if ($curralias ne '') {
                 $line.='<span class="LC_nobreak"><a href="javascript:delalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'.
                        $lt{'da'}.'</a></span>';
@@ -5783,11 +5794,16 @@
                 $line.='<span class="LC_nobreak"><a href="javascript:setalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'.
                        $lt{'sa'}.'</a></span>';
             }
+            $line.= '</div>';
         }
-        $line.='</td>';
+        $line.='</td><th class="LC_rowheader"'.$tdwidth.' id="row'.$shown.'">';
+    } else {
+        $line .= '<td'.$tdwidth.'>';
     }
-    $line .= '<td><span class="LC_nobreak">';
     my ($link,$nolink);
+    my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons");
+    my $whitespace =
+        '<img src="'.$location.'/whitespace_2x2.gif" alt="" width="2px" />';
     if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) {
         if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage) {
             if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
@@ -5795,87 +5811,78 @@
             }
         }
         if ($nolink) {
-            $line .= '<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" /></a>';
+            $line.='<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />'.$whitespace.$title;
         } else {
-            $line.='<a href="'.$url.'"><img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" /></a>';
+            $line.='<a href="'.$url.'"><img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />'
+                  .$whitespace.$title.'</a>';
+        }
+        if (!$allowed && $supplementalflag && $canedit && $isfolder) {
+            my $editicon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';
+            my $editurl = $url;
+            $editurl =~ s{^\Q/adm/supplemental?\E}{/adm/coursedocs?command=direct&forcesupplement=1&};
+            $line .= ' <a href="'.$editurl.'">'
+                    .'<img src="'.$editicon.'" alt="'.&mt('Edit Content').'" title="'.&mt('Edit Folder').'" />'
+                    .'</a>';
+        }
+        if ((($hiddenfolder) || ($hiddenres)) && (!$allowed) && ($supplementalflag))  {
+            $line.= ' <span class="LC_warning">('.&mt('hidden').')</span> ';
         }
     } elsif ($url) {
-       if ($anchor ne '') {
-           if ($supplementalflag) {
-               $anchor = '&anchor='.&HTML::Entities::encode($anchor,'"<>&');
-           } else {
-               $anchor = '#'.&HTML::Entities::encode($anchor,'"<>&');
-           }
-       }
-       if (($nomodal) && ($hostname ne '')) {
-           $link = 'http://'.$hostname.$url;
-       } else {
+        if ($anchor ne '') {
+            if ($supplementalflag) {
+                $anchor = '&anchor='.&HTML::Entities::encode($anchor,'"<>&');
+            } else {
+                $anchor = '#'.&HTML::Entities::encode($anchor,'"<>&');
+            }
+        }
+        if (($nomodal) && ($hostname ne '')) {
+            $link = 'http://'.$hostname.$url;
+        } else {
            $link = $url;
-       }
-       my $inhibitmenu;
-       if ((($supplementalflag) && ($allowed) && ($url =~ m{^/adm/wrapper/})) ||
-           (($allowed) && (($url =~ m{^/adm/(viewclasslist|$match_domain/$match_username/aboutme)(\?|$)}) ||
-                           ($url =~ m{^/public/$match_domain/$match_courseid/syllabus(\?|$)})))) {
-           $inhibitmenu = 'only_body=1';
-       } else {
-           $inhibitmenu = 'inhibitmenu=yes';
-       }
-       $link = &js_escape($link.(($url=~/\?/)?'&':'?').$inhibitmenu.$anchor);
-       if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage && !$uploaded) {
-           if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
-               $nolink = 1;
-           }
-       }
-       if ($nolink) {
-           $line.='<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />';
-       } elsif ($nomodal) {
-           $line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'.
-                  '<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" border="0" /></a>';
-       } else {
-           $line.=&Apache::loncommon::modal_link($link,
-                                                 '<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />',600,500);
-       }
-    } else {
-       $line.='<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />';
-    }
-    $line.='</span></td><td'.$tdwidth.'>';
-    if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) {
-       if ($nolink) {
-           $line.=$title;
-       } else {
-           $line.='<a href="'.$url.'">'.$title.'</a>';
-       }
-       if (!$allowed && $supplementalflag && $canedit && $isfolder) {
-           my $editicon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';
-           my $editurl = $url;
-           $editurl =~ s{^\Q/adm/supplemental?\E}{/adm/coursedocs?command=direct&forcesupplement=1&};
-           $line .= ' '.'<a href="'.$editurl.'">'.
-                    '<img src="'.$editicon.'" alt="'.&mt('Edit Content').'" title="'.&mt('Edit Content').'" />'.
-                    '</a>';
-       }
-       if ((($hiddenfolder) || ($hiddenres)) && (!$allowed) && ($supplementalflag))  {
-           $line.= ' <span class="LC_warning">('.&mt('hidden').')</span> ';
-       }
-    } elsif ($url) {
-       if ($nolink) {
-           $line.=$title;
-       } elsif ($nomodal) {
-           $line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'.
-                  $title.'</a>';
-       } else {
-           $line.=&Apache::loncommon::modal_link($link,$title,600,500);
-       }
-    } elsif (($hiddenfolder) || ($hiddenres)) {
-       $line.=$title.' <span class="LC_warning LC_docs_reinit_warn">('.&mt('Hidden').')</span>';
-    } else {
-       $line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>';
+        }
+        my $inhibitmenu;
+        if ((($supplementalflag) && ($allowed) && ($url =~ m{^/adm/wrapper/})) ||
+            (($allowed) && (($url =~ m{^/adm/(viewclasslist|$match_domain/$match_username/aboutme)(\?|$)}) ||
+                            ($url =~ m{^/public/$match_domain/$match_courseid/syllabus(\?|$)})))) {
+            $inhibitmenu = 'only_body=1';
+        } else {
+            $inhibitmenu = 'inhibitmenu=yes';
+        }
+        $link = &js_escape($link.(($url=~/\?/)?'&':'?').$inhibitmenu.$anchor);
+        if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage && !$uploaded) {
+            if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
+                $nolink = 1;
+            }
+        }
+        if ($nolink) {
+            $line.='<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />'.$whitespace.$title;
+        } elsif ($nomodal) {
+            $line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'
+                 .'<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" border="0" />'
+                 .$whitespace.$title.'</a>';
+        } else {
+            $line.=&Apache::loncommon::modal_link($link,
+                                                  '<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />'
+                                                 .$whitespace.$title,600,500);
+        }
+    } else {
+        $line.='<img src="'.$icon.'" alt="'.$icontext.'" class="LC_icon" />';
+        if (($hiddenfolder) || ($hiddenres)) {
+            $line.=$whitespace.$title.' <span class="LC_warning LC_docs_reinit_warn">('.&mt('Hidden').')</span>';
+        } else {
+            $line.=$whitespace.$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>';
+        }
     }
     if (($allowed) && ($curralias ne '')) {
         $line .= '<br /><span class="LC_docs_alias_name">('.$curralias.')</span>';
     } else {
         $line .= $extresform;
     }
-    $line .= '</td>';
+    if ($allowed) {
+        $line .= '</th>';
+    } else {
+        $line .= '</td>';
+    }
     $rand_pick_text = ' ' if ($rand_pick_text eq '');
     $rand_order_text = ' ' if ($rand_order_text eq '');
     if ($uploaded && $url && !$isfolder && !$ispage) {
@@ -5900,7 +5907,8 @@
     <form action="/adm/coursedocs" method="post" name="$formhidden">
     $form_param
     $form_common
-    <label><input type="checkbox" name="hiddenresource_$orderidx" id="hiddenresource_$orderidx" onclick="checkForSubmit(this.form,'hiddenresource','settings');" $hidtext $disabled /> $lt{'hd'}</label>
+    <div style="display: inline-block; margin: 2px 0 2px 0;">
+    <label><input type="checkbox" name="hiddenresource_$orderidx" id="hiddenresource_$orderidx" onclick="checkForSubmit(this.form,'hiddenresource','settings');" $hidtext $disabled /> $lt{'hd'}</label></div>
     $form_end
 ENDPARMS
         if ($folder =~/^supplemental/) {
@@ -5918,11 +5926,15 @@
     <form action="/adm/coursedocs" method="post" name="$formurlhidden">
     $form_param
     $form_common
-    <label><input type="checkbox" name="encrypturl_$orderidx" id="encrypturl_$orderidx" onclick="checkForSubmit(this.form,'encrypturl','settings');" $enctext $disabled /> $lt{'ec'}</label>
+    <div style="display: inline-block; margin: 2px 0 2px 0;">
+    <label><input type="checkbox" name="encrypturl_$orderidx" id="encrypturl_$orderidx" onclick="checkForSubmit(this.form,'encrypturl','settings');" $enctext $disabled /> $lt{'ec'}</label></div>
     $form_end
   </td>
-  <td class="LC_docs_entry_parameter">$rand_pick_text<br />
-                                      $rand_order_text</td>
+  <td class="LC_docs_entry_parameter">
+  <div style="display: inline-block; margin: 2px 0 2px 0;">
+  $rand_pick_text</div><br />
+  <div style="display: inline-block; margin: 2px 0 2px 0;"> 
+  $rand_order_text</div></td>
 ENDPARMS
         }
     }
@@ -7661,9 +7673,11 @@
 	<!-- <label>$lt{'parse'}?
 	<input type="checkbox" name="parserflag" />
 	</label> -->
+        <div style="display: inline-block; margin: 2px 0 2px 0; padding: 0;">
 	<label>
 	<input type="checkbox" name="parserflag" checked="checked" $disabled /> $lt{'parse'}
 	</label>
+        </div>
 CHBO
         my $imsfolder = $env{'form.folder'};
         if ($imsfolder eq '') {
@@ -7681,14 +7695,14 @@
         <input type="hidden" id="LC_free_space_ims" value="$free_space" />
         <br />
         <p>
-        $lt{'cms'}:  
+        <label>$lt{'cms'}:  
         <select name="source" $disabled>
         <option value="-1" selected="selected">$lt{'se'}</option>
         <option value="bb5">$lt{'bb5'}</option>
         <option value="bb6">$lt{'bb6'}</option>
         <option value="angel5">$lt{'angel5'}</option>
         <option value="webctce4">$lt{'webctce4'}</option>
-        </select>
+        </select></label>
         <input type="hidden" name="folder" value="$imsfolder" />
         </p>
         <input type="hidden" name="phase" value="one" />
@@ -7742,7 +7756,9 @@
         <input type="text" name="importmap" size="40" value="" 
         onfocus="this.blur();$mapimportjs" $disabled />
          <a href="$mapimportjs">$lt{'selm'}</a></span></label><br />
+        <div style="display: inline-block; margin: 2px 0 0 0; padding: 0;"> 
         <input type="submit" name="loadmap" value="$lt{'load'}" $disabled />
+        </div>
         </fieldset>
         </form>
 
@@ -7807,9 +7823,9 @@
         }
 
 	my @importpubforma = (
-	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'"  onclick="javascript:groupsearch()" />' => $pathitem."<a class='LC_menubuttons_link' href='javascript:groupsearch()'>$lt{'srch'}</a>$help{'Search_LON-CAPA_Resource'}" },
-	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'"  onclick="javascript:groupimport();"/>' => "<a class='LC_menubuttons_link' href='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" },
-	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/wishlist.png" alt="'.$lt{lnks}.'" onclick="javascript:'.$fromstoredjs.';" />' => '<a class="LC_menubuttons_link" href="javascript:'.$fromstoredjs.';">'.$lt{'lnks'}.'</a>'.$help{'Import_Stored_Links'} },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt=""  onclick="javascript:groupsearch()" />' => $pathitem."<a class='LC_menubuttons_link' href='javascript:groupsearch()'>$lt{'srch'}</a>$help{'Search_LON-CAPA_Resource'}" },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt=""  onclick="javascript:groupimport();"/>' => "<a class='LC_menubuttons_link' href='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/wishlist.png" alt="" onclick="javascript:'.$fromstoredjs.';" />' => '<a class="LC_menubuttons_link" href="javascript:'.$fromstoredjs.';">'.$lt{'lnks'}.'</a>'.$help{'Import_Stored_Links'} },
         { '<img class="LC_noBorder LC_middle" src="/res/adm/pages/sequence.png" alt="'.$lt{impm}.'" onclick="javascript:toggleMap(\'map\');" />' => $importpubform },
         );
         if ($importcrsresform) {
@@ -8047,7 +8063,8 @@
             $is_home{'course'} = 1;
         }
         $rolehomes .= '<input type="hidden" id="rolehome_course" name="rolehome_course" value="'.$crshome.'" />'."\n";
-        my $pickdir = '<label>'.$lt{'loca'}.
+        my $pickdir = '<div style="display: inline-block; margin: 0 0 2px 0; padding: 0;">'.
+                   '<label>'.$lt{'loca'}.
                    '<select name="authorrole" onchange="populateDirSelects(this.form,'."'authorrole','authorpath'".',1,1,0);">'."\n".
                    '<option value="" selected="selected">'.&mt('Select').'</option>'."\n";
         if ($env{'user.author'}) {
@@ -8068,7 +8085,7 @@
         if ($checkcrsres) {
             $pickdir .= '<option value="course">'.&mt('Course Resource').'</option>'."\n";
         }
-        $pickdir .= '</select></label><br />'."\n".
+        $pickdir .= '</select></label></div><br />'."\n".
                     '<label>'.$lt{'dire'}.
                     '<select name="authorpath" onchange="toggleCrsResTitle();">'.
                     '<option value=""></option>'.
@@ -8237,21 +8254,21 @@
             );
         } else {
 	    @specialdocumentsforma=(
-	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/page.png" alt="'.$lt{newp}.'"  onclick="javascript:makenewpage(document.newpage,\''.$pageseq.'\');" />'=>$newpageform},
-	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="javascript:makenew(document.newsyl);" />'=>$newsylform},
-	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/navigation.png" alt="'.$lt{navc}.'" onclick="javascript:makenew(document.newnav);" />'=>$newnavform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simple.png" alt="'.$lt{sipa}.'" onclick="javascript:makesmppage();" />'=>$newsmppageform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage();" />'=>$newwebpageform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/page.png" alt=""  onclick="javascript:makenewpage(document.newpage,\''.$pageseq.'\');" />'=>$newpageform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="" onclick="javascript:makenew(document.newsyl);" />'=>$newsylform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/navigation.png" alt="" onclick="javascript:makenew(document.newnav);" />'=>$newnavform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simple.png" alt="" onclick="javascript:makesmppage();" />'=>$newsmppageform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="" onclick="javascript:makewebpage();" />'=>$newwebpageform},
             );
         }
         $specialdocumentsform = &create_form_ul(&create_list_elements(@specialdocumentsforma));
 
         my @external = (
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="toggleExternal(\'ext\');" />'=>$extresourcesform}
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="" onclick="toggleExternal(\'ext\');" />'=>$extresourcesform}
         );
         if ($posslti) {
             push(@external,
-                 {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="'.$lt{extt}.'" onclick="toggleExternal(\'tool\');" />'=>$exttoolform},
+                 {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="" onclick="toggleExternal(\'tool\');" />'=>$exttoolform},
             );
         }
         my $externalform = &create_form_ul(&create_list_elements(@external));
@@ -8259,32 +8276,32 @@
         my @importdoc = ();
         unless ($container eq 'page') {
             push(@importdoc,
-                {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" onclick="javascript:toggleUpload(\'ims\');" />'=>$imspform}
+                {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/ims.png" alt="" onclick="javascript:toggleUpload(\'ims\');" />'=>$imspform}
             );
         }
         push(@importdoc,
-            {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/pdfupload.png" alt="'.$lt{upl}.'" onclick="javascript:toggleUpload(\'doc\');" />'=>$fileuploadform}
+            {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/pdfupload.png" alt="" onclick="javascript:toggleUpload(\'doc\');" />'=>$fileuploadform}
         );
         $fileuploadform =  &create_form_ul(&create_list_elements(@importdoc));
 
         @gradingforma=(
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="'.$lt{sipr}.'" onclick="javascript:makesmpproblem();" />'=>$newsmpproblemform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/dropbox.png" alt="'.$lt{drbx}.'" onclick="javascript:makedropbox();" />'=>$newdropboxform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/scoreupfrm.png" alt="'.$lt{scuf}.'" onclick="javascript:makeexamupload();" />'=>$newexuploadform}
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="" onclick="javascript:makesmpproblem();" />'=>$newsmpproblemform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/dropbox.png" alt="" onclick="javascript:makedropbox();" />'=>$newdropboxform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/scoreupfrm.png" alt="" onclick="javascript:makeexamupload();" />'=>$newexuploadform}
         );
         if ($crsresform) {
             push(@gradingforma,
-                 {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="'.$lt{stpr}.'" onclick="javascript:toggleCrsRes(\'res\');" />'=>$crsresform}
+                 {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="" onclick="javascript:toggleCrsRes(\'res\');" />'=>$crsresform}
             );
         }
         $gradingform = &create_form_ul(&create_list_elements(@gradingforma));
 
         @communityforma=(
-       {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/bchat.png" alt="'.$lt{bull}.'" onclick="javascript:makebulboard();" />'=>$newbulform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="javascript:makebulboard();" />'=>$newaboutmeform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/aboutme.png" alt="'.$lt{abou}.'" onclick="javascript:makeabout();" />'=>$newaboutsomeoneform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/clst.png" alt="'.$lt{rost}.'" onclick="javascript:makenew(document.newroster);" />'=>$newrosterform},
-        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/groupportfolio.png" alt="'.$lt{grpo}.'" onclick="javascript:makenew(document.newgroupfiles);" />'=>$newgroupfileform},
+       {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/bchat.png" alt="" onclick="javascript:makebulboard();" />'=>$newbulform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="" onclick="javascript:makebulboard();" />'=>$newaboutmeform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/aboutme.png" alt="" onclick="javascript:makeabout();" />'=>$newaboutsomeoneform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/clst.png" alt="" onclick="javascript:makenew(document.newroster);" />'=>$newrosterform},
+        {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/groupportfolio.png" alt="" onclick="javascript:makenew(document.newgroupfiles);" />'=>$newgroupfileform},
         );
         $communityform = &create_form_ul(&create_list_elements(@communityforma));
 
@@ -8848,7 +8865,7 @@
             '<li class="goback">'.
             '<a href="javascript:toContents('."'$jumpto'".');">'.
             '<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'.
-            '  alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n".
+            '  alt="" />'.$backtext.'</a></li>'."\n".
             '<li>'.
             '<a href="javascript:groupopen('."'$readfile'".',1);">'.
             &mt('Undo Delete').'</a></li>'."\n";


More information about the LON-CAPA-cvs mailing list