[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm grades.pm /interface loncommon.pm lonnavdisplay.pm lonparmset.pm lonpreferences.pm lonprintout.pm lonuserutils.pm slotrequest.pm /interface/statistics lonstathelpers.pm /publisher lonpublisher.pm lonupload.pm
bisitz
bisitz@source.lon-capa.org
Wed, 06 May 2009 16:19:51 -0000
This is a MIME encoded message
--bisitz1241626791
Content-Type: text/plain
bisitz Wed May 6 16:19:51 2009 EDT
Modified files:
/loncom/homework bridgetask.pm grades.pm
/loncom/interface loncommon.pm lonnavdisplay.pm lonparmset.pm
lonpreferences.pm lonprintout.pm lonuserutils.pm
slotrequest.pm
/loncom/interface/statistics lonstathelpers.pm
/loncom/publisher lonpublisher.pm lonupload.pm
Log:
XHTML conform selected/checked/multiple HTML attributes
and optimized spacing
--bisitz1241626791
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090506161951.txt"
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.248 loncom/homework/bridgetask.pm:1.249
--- loncom/homework/bridgetask.pm:1.248 Sat May 2 22:18:24 2009
+++ loncom/homework/bridgetask.pm Wed May 6 16:19:26 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.248 2009/05/02 22:18:24 foxr Exp $
+# $Id: bridgetask.pm,v 1.249 2009/05/06 16:19:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3007,14 +3007,14 @@
$comment = &HTML::Entities::encode($comment,'<>"&');
my %checked;
foreach my $which ('ungraded','fail','pass','review') {
- if ($status eq $which) { $checked{$which} = 'checked="checked"'; }
+ if ($status eq $which) { $checked{$which} = ' checked="checked"'; }
}
- if (!%checked) { $checked{'ungraded'} = 'checked="checked"'; }
+ if (!%checked) { $checked{'ungraded'} = ' checked="checked"'; }
my $buttons;
foreach my $which ('ungraded','fail','pass','review') {
$buttons .= <<END_BUTTON;
<label class="LC_GRADING_$which">
- <input type="radio" name="HWVAL_$link" value="$which" $checked{$which} />
+ <input type="radio" name="HWVAL_$link" value="$which"$checked{$which} />
$lt{$which}
</label>
END_BUTTON
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.568 loncom/homework/grades.pm:1.569
--- loncom/homework/grades.pm:1.568 Tue May 5 00:42:28 2009
+++ loncom/homework/grades.pm Wed May 6 16:19:26 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.568 2009/05/05 00:42:28 raeburn Exp $
+# $Id: grades.pm,v 1.569 2009/05/06 16:19:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6777,10 +6777,10 @@
if ($closest > 0) {
foreach my $testcode (@{$closest}) {
my $checked='';
- if (!$i) { $checked=' checked="checked" '; }
+ if (!$i) { $checked=' checked="checked"'; }
$r->print("
<label>
- <input type='radio' name='scantron_CODE_resolution' value='use_closest_$i' $checked />
+ <input type='radio' name='scantron_CODE_resolution' value='use_closest_$i'$checked />
".&mt("Use the similar CODE [_1] instead.",
"<b><tt>".$testcode."</tt></b>")."
</label>
@@ -6791,10 +6791,10 @@
}
}
if ($$scan_record{'scantron.CODE'}=~/\S/ ) {
- my $checked; if (!$i) { $checked=' checked="checked" '; }
+ my $checked; if (!$i) { $checked=' checked="checked"'; }
$r->print("
<label>
- <input type='radio' name='scantron_CODE_resolution' value='use_unfound' $checked />
+ <input type='radio' name='scantron_CODE_resolution' value='use_unfound'$checked />
".&mt("Use the CODE [_1] that is was on the paper, ignoring the error.",
"<b><tt>".$$scan_record{'scantron.CODE'}."</tt></b>")."
</label>");
@@ -8657,7 +8657,7 @@
my %checked;
foreach my $gradingmechanism ('attendance','personnel','specific','given') {
if ($env{'form.gradingmechanism'} eq $gradingmechanism) {
- $checked{$gradingmechanism}="checked='checked'";
+ $checked{$gradingmechanism}=' checked="checked"';
}
}
@@ -8721,11 +8721,11 @@
<input type="hidden" name="saveState" value="$env{'form.saveState'}" />
<input type="file" name="upfile" size="50" />
<br /><label>$type: $selectform</label>
-<br /><label><input type="radio" name="gradingmechanism" value="attendance" $checked{'attendance'} onClick="sanitycheck()" />$attendance </label>
-<br /><label><input type="radio" name="gradingmechanism" value="personnel" $checked{'personnel'} onClick="sanitycheck()" />$personnel</label>
-<br /><label><input type="radio" name="gradingmechanism" value="specific" $checked{'specific'} onClick="sanitycheck()" />$specific </label>
+<br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onClick="sanitycheck()" />$attendance </label>
+<br /><label><input type="radio" name="gradingmechanism" value="personnel"$checked{'personnel'} onClick="sanitycheck()" />$personnel</label>
+<br /><label><input type="radio" name="gradingmechanism" value="specific"$checked{'specific'} onClick="sanitycheck()" />$specific </label>
<input type="text" name="specificid" value="$env{'form.specificid'}" size="20" />
-<br /><label><input type="radio" name="gradingmechanism" value="given" $checked{'given'} onClick="sanitycheck()" />$given </label>
+<br /><label><input type="radio" name="gradingmechanism" value="given"$checked{'given'} onClick="sanitycheck()" />$given </label>
<br />
<input type="text" name="givenanswer" size="50" />
<input type="hidden" name="waschecked" value="$env{'form.gradingmechanism'}" />
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.803 loncom/interface/loncommon.pm:1.804
--- loncom/interface/loncommon.pm:1.803 Tue May 5 16:51:22 2009
+++ loncom/interface/loncommon.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.803 2009/05/05 16:51:22 bisitz Exp $
+# $Id: loncommon.pm,v 1.804 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1855,7 +1855,7 @@
if ($numlib > 1) {
$result .= '<select name="'.$name.'" />'."\n";
if ($default) {
- $result .= '<option value="default" selected>'.&mt('default').
+ $result .= '<option value="default" selected="selected">'.&mt('default').
'</option>'."\n";
}
foreach my $hostid (sort(keys(%servers))) {
Index: loncom/interface/lonnavdisplay.pm
diff -u loncom/interface/lonnavdisplay.pm:1.9 loncom/interface/lonnavdisplay.pm:1.10
--- loncom/interface/lonnavdisplay.pm:1.9 Wed Mar 18 11:12:36 2009
+++ loncom/interface/lonnavdisplay.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavdisplay.pm,v 1.9 2009/03/18 11:12:36 bisitz Exp $
+# $Id: lonnavdisplay.pm,v 1.10 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -292,16 +292,16 @@
"Show only uncompleted problems");
}
- my %selected=($env{'form.sort'} => 'selected=on');
+ my %selected=($env{'form.sort'} => ' selected="selected"');
my $sort_html=("<form name=\"sortForm\">
<span class=\"LC_nobreak\">
<input type=\"hidden\" name=\"showOnlyHomework\" value=\"".$env{'form.showOnlyHomework'}."\" />
".&mt('Sort by:')."
<select name=\"sort\" onChange=\"document.sortForm.submit()\">
- <option value=\"default\" $selected{'default'}>".&mt('Default')."</option>
- <option value=\"title\" $selected{'title'} >".&mt('Title')."</option>
- <option value=\"duedate\" $selected{'duedate'}>".&mt('Duedate')."</option>
- <option value=\"discussion\" $selected{'discussion'}>".&mt('Has New Discussion')."</option>
+ <option value=\"default\"$selected{'default'}>".&mt('Default')."</option>
+ <option value=\"title\"$selected{'title'} >".&mt('Title')."</option>
+ <option value=\"duedate\"$selected{'duedate'}>".&mt('Duedate')."</option>
+ <option value=\"discussion\"$selected{'discussion'}>".&mt('Has New Discussion')."</option>
</select>
</span>
</form>");
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.443 loncom/interface/lonparmset.pm:1.444
--- loncom/interface/lonparmset.pm:1.443 Tue May 5 16:53:25 2009
+++ loncom/interface/lonparmset.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.443 2009/05/05 16:53:25 neumanie Exp $
+# $Id: lonparmset.pm,v 1.444 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4615,12 +4615,12 @@
} elsif ($defkeytype{$tempkey} eq 'string_yesno') {
my $yeschecked='';
my $nochecked='';
- if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked='checked="checked"'; }
- if (&rulescache($tempkey.'_value') eq 'no') { $nochecked='checked="checked"'; }
+ if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked=' checked="checked"'; }
+ if (&rulescache($tempkey.'_value') eq 'no') { $nochecked=' checked="checked"'; }
$r->print(<<ENDYESNO);
-<label><input type="radio" name="$tempkey\_value" value="yes" $yeschecked /> $lt{'yes'}</label><br />
-<label><input type="radio" name="$tempkey\_value" value="no" $nochecked /> $lt{'no'}</label>
+<label><input type="radio" name="$tempkey\_value" value="yes"$yeschecked /> $lt{'yes'}</label><br />
+<label><input type="radio" name="$tempkey\_value" value="no"$nochecked /> $lt{'no'}</label>
ENDYESNO
} else {
$r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />');
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.158 loncom/interface/lonpreferences.pm:1.159
--- loncom/interface/lonpreferences.pm:1.158 Tue May 5 16:01:50 2009
+++ loncom/interface/lonpreferences.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.158 2009/05/05 16:01:50 bisitz Exp $
+# $Id: lonpreferences.pm,v 1.159 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -367,13 +367,13 @@
my $checked = "";
my $value = $recent_roles{$role_key};
if ($frozen_roles{$role_key}) {
- $checked = "checked=\"checked\"";
+ $checked = ' checked="checked"';
}
$count++;
$roles_check_list .=
&Apache::loncommon::start_data_table_row().
'<td class="LC_table_cell_checkbox">'.
- "<input type=\"checkbox\" $checked name=\"freezeroles\"".
+ "<input type=\"checkbox\"$checked name=\"freezeroles\"".
" id=\"freezeroles$count\" value=\"$role_key\" /></td>".
"<td><label for=\"freezeroles$count\">".
"$role_text{$role_key}</label></td>".
@@ -388,7 +388,7 @@
<form name="prefs" action="/adm/preferences" method="POST">
<input type="hidden" name="action" value="verify_and_change_rolespref" />
<br /><label>'.&mt('Enable Recent '.$role.'s Hotlist:').'
-<input type="checkbox" '.$checked.' name="recentroles" value="true" /></label>
+<input type="checkbox"'.$checked.' name="recentroles" value="true" /></label>
<br />'.&mt('Number of '.$role.'s in Hotlist:').'
<select name="recentrolesn" size="1">
'.$options.'
@@ -689,7 +689,7 @@
('environment',['domcoord.author']);
my $constchecked='';
if ($userenv{'domcoord.author'} eq 'blocked') {
- $constchecked='checked="checked"';
+ $constchecked=' checked="checked"';
}
my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
my $construction=&mt('Block access to construction space');
@@ -698,7 +698,7 @@
<form name="prefs" action="/adm/preferences" method="post">
<input type="hidden" name="action" value="verify_and_change_domcoord" />
$text<br />
-<label><input type="checkbox" name="construction" $constchecked />$construction</label><br />
+<label><input type="checkbox" name="construction"$constchecked />$construction</label><br />
<input type="submit" value="$change" />
</form>
ENDSCREEN
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.552 loncom/interface/lonprintout.pm:1.553
--- loncom/interface/lonprintout.pm:1.552 Sat May 2 22:16:09 2009
+++ loncom/interface/lonprintout.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.552 2009/05/02 22:16:09 foxr Exp $
+# $Id: lonprintout.pm,v 1.553 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3550,9 +3550,9 @@
my $i;
for ($i = 1; $i <= $maxColumns; $i++) {
if ($i == 2) {
- $result .= "<option value='$i' selected>$i</option>\n";
+ $result .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
} else {
- $result .= "<option value='$i'>$i</option>\n";
+ $result .= '<option value="'.$i.'">'.$i.'</option>'."\n";
}
}
@@ -3568,9 +3568,9 @@
$_=~/(\w+)/;
my $papersize=$1;
if ($paperSize[$i]=~/$DefaultPaperSize/) {
- $result .= "<option selected value='$papersize'>" . $paperSize[$i] . "</option>\n";
+ $result .= '<option selected="selected" value="'.$papersize.'">'.$paperSize[$i].'</option>'."\n";
} else {
- $result .= "<option value='$papersize'>" . $paperSize[$i] . "</option>\n";
+ $result .= '<option value="'.$papersize.'">'.$paperSize[$i].'</option>'."\n";
}
$i++;
}
@@ -3579,8 +3579,8 @@
</td>
<td align='center'>
<select name='${var}.pdfFormFields'>
- <option selected value='no'>$without</option>
- <option value='yes'>$with</option>
+ <option selected="selected" value="no">$without</option>
+ <option value="yes">$with</option>
</select>
</td>
HTML
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.91 loncom/interface/lonuserutils.pm:1.92
--- loncom/interface/lonuserutils.pm:1.91 Wed May 6 13:39:16 2009
+++ loncom/interface/lonuserutils.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.91 2009/05/06 13:39:16 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.92 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4443,7 +4443,7 @@
my $output = '';
my @sections = (sort {$a <=> $b} keys %{$sections_count});
my $numsec = scalar(@sections);
- my $is_selected = ' selected="selected" ';
+ my $is_selected = ' selected="selected"';
if ($numsec <= 1) {
$output = '<select name="currsec_'.$role.'" >'."\n".
' <option value="">'.&mt('Select').'</option>'."\n";
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.96 loncom/interface/slotrequest.pm:1.97
--- loncom/interface/slotrequest.pm:1.96 Mon May 4 16:45:58 2009
+++ loncom/interface/slotrequest.pm Wed May 6 16:19:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.96 2009/05/04 16:45:58 bisitz Exp $
+# $Id: slotrequest.pm,v 1.97 2009/05/06 16:19:34 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2103,7 +2103,7 @@
Enter as many fields as you can. The system will inform you and bring you back
to this page if the data selected is insufficient to create the slots.<hr />
<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" />
-<label><input type="checkbox" name="noFirstLine" $checked />$ignore</label>
+<label><input type="checkbox" name="noFirstLine"$checked />$ignore</label>
<input type="hidden" name="associate" value="" />
<input type="hidden" name="datatoken" value="$datatoken" />
<input type="hidden" name="fileupload" value="$env{'form.fileupload'}" />
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.58 loncom/interface/statistics/lonstathelpers.pm:1.59
--- loncom/interface/statistics/lonstathelpers.pm:1.58 Wed Mar 25 15:49:53 2009
+++ loncom/interface/statistics/lonstathelpers.pm Wed May 6 16:19:42 2009
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.58 2009/03/25 15:49:53 bisitz Exp $
+# $Id: lonstathelpers.pm,v 1.59 2009/05/06 16:19:42 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -158,14 +158,14 @@
resptype=>$resptype});
my $checked = '';
if ($env{'form.problemchoice'} eq $value) {
- $checked = 'checked="checked" ';
+ $checked = ' checked="checked"';
}
my $title = $res->compTitle;
if (! defined($title) || $title eq '') {
($title) = ($res->src =~ m:/([^/]*)$:);
}
$seq_str .= '<tr>'.
- qq{<td><input type="radio" id="$rb_count" name="problemchoice" value="$value" $checked /></td>}.
+ qq{<td><input type="radio" id="$rb_count" name="problemchoice" value="$value"$checked /></td>}.
'<td><label for="'.$rb_count.'">'.$resptype.'</label></td>'.
'<td><label for="'.$rb_count.'">'.$title.'</label>';
if (scalar(@response_ids) > 1) {
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.256 loncom/publisher/lonpublisher.pm:1.257
--- loncom/publisher/lonpublisher.pm:1.256 Sat Apr 4 20:06:43 2009
+++ loncom/publisher/lonpublisher.pm Wed May 6 16:19:50 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.256 2009/04/04 20:06:43 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.257 2009/05/06 16:19:50 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -384,11 +384,11 @@
my $selout="\n".&Apache::lonhtmlcommon::row_title($title)
.'<select name="'.$name.'">';
foreach (@idlist) {
- $selout.='<option value=\''.$_.'\'';
+ $selout.='<option value="'.$_.'"';
if ($_ eq $value) {
- $selout.=' selected>'.&{$functionref}($_).'</option>';
- }
- else {$selout.='>'.&{$functionref}($_).'</option>';}
+ $selout.=' selected="selected"';
+ }
+ $selout.='>'.&{$functionref}($_).'</option>';
}
$selout.='</select>'.&Apache::lonhtmlcommon::row_closure();
return $selout;
@@ -1401,7 +1401,7 @@
(&Apache::loncommon::source_copyrightids));
# $intr_scrout.=&text_with_browse_field('Source Custom Distribution File','sourcerights',$metadatafields{'sourcerights'},'rights');
my $uctitle=&mt('Obsolete');
- my $obsolete_checked=($metadatafields{'obsolete'})?' checked="checked" ':'';
+ my $obsolete_checked=($metadatafields{'obsolete'})?' checked="checked"':'';
$intr_scrout.="\n".&Apache::lonhtmlcommon::row_title($uctitle)
.'<input type="checkbox" name="obsolete"'.$obsolete_checked.' />'
.&Apache::lonhtmlcommon::row_closure(1);
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.44 loncom/publisher/lonupload.pm:1.45
--- loncom/publisher/lonupload.pm:1.44 Thu Mar 26 16:50:12 2009
+++ loncom/publisher/lonupload.pm Wed May 6 16:19:50 2009
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Handler to upload files into construction space
#
-# $Id: lonupload.pm,v 1.44 2009/03/26 16:50:12 bisitz Exp $
+# $Id: lonupload.pm,v 1.45 2009/05/06 16:19:50 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -191,7 +191,7 @@
'<br />'.
'<br />'.&mt('Choose file type:').'
<select name="filetype">
- <option value="standard" selected>'.&mt('Regular file').'
+ <option value="standard" selected="selected">'.&mt('Regular file').'
<option value="testbank">'.&mt('Testbank file').'
<option value="imsimport">'.&mt('IMS package').'
</select>'.&Apache::loncommon::help_open_topic("Uploading_File_Options").'
--bisitz1241626791--