[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 02 May 2007 01:17:39 -0000
This is a MIME encoded message
--albertel1178068659
Content-Type: text/plain
albertel Tue May 1 21:17:39 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- eliminating <font> for css
- change Store to Save
--albertel1178068659
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20070501211739.txt"
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.397 loncom/homework/grades.pm:1.398
--- loncom/homework/grades.pm:1.397 Thu Apr 26 18:29:50 2007
+++ loncom/homework/grades.pm Tue May 1 21:17:37 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.397 2007/04/26 22:29:50 albertel Exp $
+# $Id: grades.pm,v 1.398 2007/05/02 01:17:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -102,10 +102,10 @@
sub nameUserString {
my ($type,$fullname,$uname,$udom) = @_;
if ($type eq 'header') {
- return '<b> Fullname </b><font color="#999999">(Username)</font>';
+ return '<b> Fullname </b><span class="LC_internal_info">(Username)</span>';
} else {
- return ' '.$fullname.'<font color="#999999"> ('.$uname.
- ($env{'user.domain'} eq $udom ? '' : ' ('.$udom.')').')</font>';
+ return ' '.$fullname.'<span class="LC_internal_info"> ('.$uname.
+ ($env{'user.domain'} eq $udom ? '' : ' ('.$udom.')').')</span>';
}
}
@@ -151,7 +151,7 @@
my ($partID,$symb)=@_;
my $display=&Apache::lonnet::EXT('resource.'.$partID.'.display',$symb);
if (defined($display) and $display ne '') {
- $display.= " (<font color=\"#999900\">id $partID</font>)";
+ $display.= " (<span class=\"LC_internal_info\">id $partID</span>)";
} else {
$display=$partID;
}
@@ -164,9 +164,8 @@
my ($symb,$probTitle,$checkboxes) = @_;
my $col=3;
if ($checkboxes) { $col=4; }
- my $result ='<table border="0">'.
- '<tr><td colspan="'.$col.'"><font size="+1"><b>'.&mt('Current Resource').': </b>'.
- $probTitle.'</font></td></tr>'."\n";
+ my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n";
+ $result .='<table border="0">';
my ($partlist,$handgrade,$responseType) = &response_type($symb);
my %resptype = ();
my $hdgrade='no';
@@ -186,8 +185,8 @@
$partsseen{$partID}=1;
}
my $display_part=&get_display_part($partID,$symb);
- $result.='<td><b>Part: </b>'.$display_part.' <font color="#999999">'.
- $resID.'</font></td>'.
+ $result.='<td><b>Part: </b>'.$display_part.' <span class="LC_internal_info">'.
+ $resID.'</span></td>'.
'<td><b>Type: </b>'.$responsetype.'</td></tr>';
# '<td><b>Handgrade: </b>'.$handgrade.'</td></tr>';
}
@@ -218,7 +217,7 @@
sub cleanRecord {
my ($answer,$response,$symb,$partid,$respid,$record,$order,$version,
$uname,$udom) = @_;
- my $grayFont = '<font color="#999999">';
+ my $grayFont = '<span class="LC_internal_info">';
if ($response =~ /^(option|rank)$/) {
my %answer=&Apache::lonnet::str2hash($answer);
my %grading=&Apache::lonnet::str2hash($record->{$version."resource.$partid.$respid.submissiongrading"});
@@ -229,11 +228,11 @@
} else {
$toprow.='<td><i>'.$answer{$foil}.' </i></td>';
}
- $bottomrow.='<td>'.$grayFont.$foil.'</font> </td>';
+ $bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Option ID</font></td>'.
+ '<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'.
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>';
} elsif ($response eq 'match') {
my %answer=&Apache::lonnet::str2hash($answer);
@@ -244,18 +243,18 @@
my $item=shift(@items);
if ($grading{$foil} == 1) {
$toprow.='<td><b>'.$item.' </b></td>';
- $middlerow.='<td><b>'.$grayFont.$answer{$foil}.' </font></b></td>';
+ $middlerow.='<td><b>'.$grayFont.$answer{$foil}.' </span></b></td>';
} else {
$toprow.='<td><i>'.$item.' </i></td>';
- $middlerow.='<td><i>'.$grayFont.$answer{$foil}.' </font></i></td>';
+ $middlerow.='<td><i>'.$grayFont.$answer{$foil}.' </span></i></td>';
}
- $bottomrow.='<td>'.$grayFont.$foil.'</font> </td>';
+ $bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Item ID</font></td>'.
+ '<tr valign="top"><td>'.$grayFont.'Item ID</span></td>'.
$middlerow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Option ID</font></td>'.
+ '<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'.
$bottomrow.'</tr>'.'</table></blockquote>';
} elsif ($response eq 'radiobutton') {
my %answer=&Apache::lonnet::str2hash($answer);
@@ -272,11 +271,11 @@
} else {
$toprow.='<td>false</td>';
}
- $bottomrow.='<td>'.$grayFont.$foil.'</font> </td>';
+ $bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Option ID</font></td>'.
+ '<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'.
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>';
} elsif ($response eq 'essay') {
if (! exists ($env{'form.'.$symb})) {
@@ -595,9 +594,9 @@
$receipt =~ s/[^\-\d]//g;
my ($symb) = &get_symb($request);
- my $title.='<h3><font color="#339933">Verifying Submission Receipt '.
- $receipt.'</h3></font>'."\n".
- '<font size=+1><b>Resource: </b>'.$env{'form.probTitle'}.'</font><br /><br />'."\n";
+ my $title.='<h3><span class="LC_info">Verifying Submission Receipt '.
+ $receipt.'</h3></span>'."\n".
+ '<h4><b>Resource: </b>'.$env{'form.probTitle'}.'</h4><br /><br />'."\n";
my ($string,$contents,$matches) = ('','',0);
my (undef,undef,$fullname) = &getclasslist('all','0');
@@ -668,8 +667,8 @@
$env{'form.probTitle'} = $env{'form.probTitle'} eq '' ?
&Apache::lonnet::gettitle($symb) : $env{'form.probTitle'};
- my $result='<h3><font color="#339933"> '.$viewgrade.
- ' Submissions for a Student or a Group of Students</font></h3>';
+ my $result='<h3><span class="LC_info"> '.$viewgrade.
+ ' Submissions for a Student or a Group of Students</span></h3>';
my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($symb,$env{'form.probTitle'},($env{'form.showgrading'} eq 'yes'));
@@ -881,15 +880,15 @@
if ($ctr == 0) {
my $num_students=(scalar(keys(%$fullname)));
if ($num_students eq 0) {
- $gradeTable='<br /> <font color="red">There are no students currently enrolled.</font>';
+ $gradeTable='<br /> <span class="LC_warning">There are no students currently enrolled.</span>';
} else {
my $submissions='submissions';
if ($submitonly eq 'incorrect') { $submissions = 'incorrect submissions'; }
if ($submitonly eq 'graded' ) { $submissions = 'ungraded submissions'; }
if ($submitonly eq 'queued' ) { $submissions = 'queued submissions'; }
- $gradeTable='<br /> <font color="red">'.
+ $gradeTable='<br /> <span class="LC_warning">'.
'No '.$submissions.' found for this resource for any students. ('.$num_students.
- ' students checked for '.$submissions.')</font><br />';
+ ' students checked for '.$submissions.')</span><br />';
}
} elsif ($ctr == 1) {
$gradeTable =~ s/type=checkbox/type=checkbox checked/;
@@ -1344,7 +1343,7 @@
pDoc.write("<form action=\\"inactive\\" name=\\"msgcenter\\">");
pDoc.write("<input value=\\""+usrctr+"\\" name=\\"usrctr\\" type=\\"hidden\\">");
- pDoc.write("<font color=\\"green\\" size=+1> Compose Message for \"+fullname+\"</font><br /><br />");
+ pDoc.write("<h3><span class=\\"LC_info\\"> Compose Message for \"+fullname+\"</span></h3><br /><br />");
pDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">");
pDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">");
@@ -1429,7 +1428,7 @@
hDoc.$docopen;
hDoc.write('$start_page_highlight_central');
hDoc.write("<form action=\\"inactive\\" name=\\"hlCenter\\">");
- hDoc.write("<font color=\\"green\\" size=+1> Keyword Highlight Options</font><br /><br />");
+ hDoc.write("<h3><span class=\\"LC_info\\"> Keyword Highlight Options</span></h3><br /><br />");
hDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">");
hDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">");
@@ -1480,7 +1479,7 @@
'/check.gif" height="16" border="0" />';
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb,$udom,$uname);
my $wgtmsg = ($wgt > 0 ? '(problem weight)' :
- '<font color="red">problem weight assigned by computer</font>');
+ '<span class="LC_info">problem weight assigned by computer</span>');
$wgt = ($wgt > 0 ? $wgt : '1');
my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ?
'' : &compute_points($$record{'resource.'.$partid.'.awarded'},$wgt));
@@ -1677,9 +1676,9 @@
if ($symb eq '') { $request->print("Unable to handle ambiguous references:."); return ''; }
if (!&canview($usec)) {
- $request->print('<font color="red">Unable to view requested student.('.
- $uname.'@'.$udom.' in section '.$usec.' in course id '.
- $env{'request.course.id'}.')</font>');
+ $request->print('<span class="LC_warning">Unable to view requested student.('.
+ $uname.':'.$udom.' in section '.$usec.' in course id '.
+ $env{'request.course.id'}.')</span>');
$request->print(&show_grading_menu_form($symb));
return;
}
@@ -1701,8 +1700,8 @@
if ($env{'form.handgrade'} eq 'yes' && &files_exist($request, $symb)) {
&download_all_link($request, $symb);
}
- $request->print('<h3> <font color="#339933">Submission Record</font></h3>'."\n".
- '<font size=+1> <b>Resource: </b>'.$env{'form.probTitle'}.'</font>'."\n");
+ $request->print('<h3> <span class="LC_info">Submission Record</span></h3>'."\n".
+ '<h4> <b>Resource: </b>'.$env{'form.probTitle'}.'</h4>'."\n");
if ($env{'form.handgrade'} eq 'no') {
my $checkMark='<br /><br /> <b>Note:</b> Part(s) graded correct by the computer is marked with a '.
@@ -1931,9 +1930,9 @@
my $responsetype = $responseType->{$partid}->{$respid};
if (!exists($record{"resource.$partid.$respid.submission"})) {
$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part:</b> '.
- $display_part.' <font color="#999999">( ID '.$respid.
- ' )</font> '.
- '<font color="red">Nothing submitted - no attempts</font><br /><br />';
+ $display_part.' <span class="LC_internal_info">( ID '.$respid.
+ ' )</span> '.
+ '<span class="LC_warning">Nothing submitted - no attempts</span><br /><br />';
next;
}
foreach (@$string) {
@@ -1947,10 +1946,10 @@
&most_similar($uname,$udom,$subval);
if ($osim) {
$osim=int($osim*100.0);
- $similar="<hr /><h3><font color=\"#FF0000\">Essay".
+ $similar="<hr /><h3><span class=\"LC_warning\">Essay".
" is $osim% similar to an essay by ".
&Apache::loncommon::plainname($oname,$odom).
- '</font></h3><blockquote><i>'.
+ '</span></h3><blockquote><i>'.
&keywords_highlight($oessay).
'</i></blockquote><hr />';
}
@@ -1961,11 +1960,11 @@
$$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) {
my $display_part=&get_display_part($partid,$symb);
$lastsubonly.='<tr><td bgcolor="#ffffe6">Debug -'.'<b>Part:</b> '.
- $display_part.' <font color="#999999">( hhhh ID '.$respid.
- ' )</font> ';
+ $display_part.' <span class="LC_internal_info">( hhhh ID '.$respid.
+ ' )</span> ';
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record);
if (@$files) {
- $lastsubonly.='<br /><font color="red" size="1">Like all files provided by users, this file may contain virusses</font><br />';
+ $lastsubonly.='<br /><span class="LC_warning">Like all files provided by users, this file may contain virusses</span><br />';
my $file_counter = 0;
foreach my $file (@$files) {
$file_counter ++;
@@ -2119,13 +2118,13 @@
my ($partid,$foo) = split(/submission$/,$key);
my $draft = $lasthash{$partid.'awarddetail'} eq 'DRAFT' ?
- '<font color="red">Draft Copy</font> ' : '';
+ '<span class="LC_warning">Draft Copy</span> ' : '';
push(@string, join(':', $key, $draft.$lasthash{$key}));
}
}
if (!@string) {
$string[0] =
- '<font color="red">Nothing submitted - no attempts.</font>';
+ '<span class="LC_warning">Nothing submitted - no attempts.</span>';
}
return (\@string,\$timestamp);
}
@@ -2137,8 +2136,8 @@
my $styleon = $env{'form.kwstyle'} eq '' ? '' : $env{'form.kwstyle'};
(my $styleoff = $styleon) =~ s/\</\<\//;
my @keylist = split(/[,\s+]/,$env{'form.keywords'});
- foreach (@keylist) {
- $string =~ s/\b\Q$_\E(\b|\.)/<font color\=$env{'form.kwclr'} $size\>$styleon$_$styleoff<\/font>/gi;
+ foreach my $keyword (@keylist) {
+ $string =~ s/\b\Q$keyword\E(\b|\.)/<font color\=$env{'form.kwclr'} $size\>$styleon$keyword$styleoff<\/font>/gi;
}
return $string;
}
@@ -2164,7 +2163,7 @@
next;
}
if ($errorflag eq 'not_allowed') {
- $request->print("<font color=\"red\">Not allowed to modify grades for $uname:$udom</font>");
+ $request->print("<span class=\"LC_warning\">Not allowed to modify grades for $uname:$udom</span>");
$ctr++;
next;
}
@@ -2393,7 +2392,7 @@
$ctr++;
}
if ($total < 0) {
- my $the_end = '<h3><font color="red">LON-CAPA User Message</font></h3><br />'."\n";
+ my $the_end = '<h3><span class="LC_info">LON-CAPA User Message</span></h3><br />'."\n";
$the_end.='<b>Message: </b> No more students for this section or class.<br /><br />'."\n";
$the_end.='Click on the button below to return to the grading menu.<br /><br />'."\n";
$the_end.=&show_grading_menu_form($symb);
@@ -2566,8 +2565,8 @@
$newflg.'_'.$part_resp.'_returndoc'.$file_counter,
$save_file_name);
if ($result !~ m|^/uploaded/|) {
- $request->print('<font color="red"> An errror occured ('.$result.
- ') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</font><br />');
+ $request->print('<span class="LC_error">An errror occured ('.$result.
+ ') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</span><br />');
} else {
# mark the file as read only
my @files = ($save_file_name);
@@ -2963,8 +2962,8 @@
$env{'course.'.$env{'request.course.id'}.'.domain'});
&Apache::lonnet::clear_EXT_cache_status();
- my $result='<h3><font color="#339933">'.&mt('Manual Grading').'</font></h3>';
- $result.='<font size=+1><b>Current Resource: </b>'.$env{'form.probTitle'}.'</font>'."\n";
+ my $result='<h3><span class="LC_info">'.&mt('Manual Grading').'</span></h3>';
+ $result.='<h4><b>Current Resource: </b>'.$env{'form.probTitle'}.'</h4>'."\n";
#view individual student submission form - called using Javascript viewOneStudent
$result.=&jscriptNform($symb);
@@ -3092,8 +3091,8 @@
'onClick="javascript:submit();" TARGET=_self /></form>'."\n";
if (scalar(%$fullname) eq 0) {
my $colspan=3+scalar(@parts);
- $result='<font color="red">There are no students in section "'.$env{'form.section'}.
- '" with enrollment status "'.$env{'form.Status'}.'" to modify or grade.</font>';
+ $result='<span class="LC_warning">There are no students in section "'.$env{'form.section'}.
+ '" with enrollment status "'.$env{'form.Status'}.'" to modify or grade.</span>';
}
$result.=&show_grading_menu_form($symb);
return $result;
@@ -3110,7 +3109,7 @@
"\n".$ctr.' </td><td> '.
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom.
'\')"; TARGET=_self>'.$fullname.'</a> '.
- '<font color="#999999">('.$uname.($env{'user.domain'} eq $udom ? '' : ':'.$udom).')</font></td>'."\n";
+ '<span class="LC_internal_info">('.$uname.($env{'user.domain'} eq $udom ? '' : ':'.$udom).')</span></td>'."\n";
$student=~s/:/_/; # colon doen't work in javascript for names
foreach my $apart (@$parts) {
my ($part,$type) = &split_part_type($apart);
@@ -3170,9 +3169,9 @@
my ($request) = @_;
my $symb=&get_symb($request);
- my $title='<h3><font color="#339933">Current Grade Status</font></h3>';
- $title.='<font size=+1><b>Current Resource: </b>'.$env{'form.probTitle'}.'</font><br />'."\n";
- $title.='<font size=+1><b>Section: </b>'.$env{'form.section'}.'</font>'."\n";
+ my $title='<h3><span class="LC_info">Current Grade Status</span></h3>';
+ $title.='<h4><b>Current Resource: </b>'.$env{'form.probTitle'}.'</h4><br />'."\n";
+ $title.='<h4><b>Section: </b>'.$env{'form.section'}.'</h4>'."\n";
my $result= '<table border="0"><tr><td bgcolor="#777777">'."\n";
$result.= '<table border="0"><tr bgcolor="#deffff">'.
@@ -3240,7 +3239,7 @@
my $usec=$classlist->{"$uname:$udom"}[5];
if (!&canmodify($usec)) {
my $numcols=scalar(@partid)*4+2;
- $noupdate.=$line."<td colspan=\"$numcols\"><font color=\"red\">Not allowed to modify student</font></td></tr>";
+ $noupdate.=$line."<td colspan=\"$numcols\"><span class=\"LC_waning\">Not allowed to modify student</span></td></tr>";
next;
}
my %aggregate = ();
@@ -3475,7 +3474,7 @@
my $ignore=&mt('Ignore First Line');
$request->print(<<ENDPICK);
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload">
-<h3><font color="#339933">Uploading Class Grades</font></h3>
+<h3><span class="LC_info">Uploading Class Grades</span></h3>
$result
<hr />
<h3>Identify fields</h3>
@@ -3638,7 +3637,7 @@
my $ignore=&mt('Ignore First Line');
$request->print(<<ENDPICK);
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload">
-<h3><font color="#339933">Uploading Class Grade Options</font></h3>
+<h3><span class="LC_info">Uploading Class Grade Options</span></h3>
<input type="hidden" name="command" value="csvuploadassign" />
<!--
<p>
@@ -3772,7 +3771,7 @@
$grades{$store_key}=$entries{$fields{$dest}};
}
}
- if (! %grades) { push(@skipped,"$username:$domain no data to store"); }
+ if (! %grades) { push(@skipped,"$username:$domain no data to save"); }
$grades{"resource.regrader"}="$env{'user.name'}:$env{'user.domain'}";
# &Apache::lonnet::logthis(" storing ".(join('-',%grades)));
my $result=&Apache::lonnet::cstore(\%grades,$symb,
@@ -3782,22 +3781,22 @@
$request->print('.');
} else {
$request->print("<p>
- <font color='red'>
- Failed to store student $username\@$domain.
- Message when trying to store was ($result)
- </font>
+ <span class=\"LC_error\">
+ Failed to save student $username:$domain.
+ Message when trying to save was ($result)
+ </span>
</p>" );
}
$request->rflush();
$countdone++;
}
- $request->print("<br />Stored $countdone students\n");
+ $request->print("<br />Saved $countdone students\n");
if (@skipped) {
- $request->print('<p><font size="+1"><b>Skipped Students</b></font></p>');
+ $request->print('<p><h4><b>Skipped Students</b></h4></p>');
foreach my $student (@skipped) { $request->print("$student<br />\n"); }
}
if (@notallowed) {
- $request->print('<p><font size="+1" color="red"><b>Students Not Allowed to Modify</b></font></p>');
+ $request->print('<p><span class="LC_error">Students Not Allowed to Modify</span></p>');
foreach my $student (@notallowed) { $request->print("$student<br />\n"); }
}
$request->print("<br />\n");
@@ -3836,8 +3835,8 @@
my $cnum = $env{"course.$env{'request.course.id'}.num"};
my $getsec = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
- my $result='<h3><font color="#339933"> '.
- 'Manual Grading by Page or Sequence</font></h3>';
+ my $result='<h3><span class="LC_info"> '.
+ 'Manual Grading by Page or Sequence</span></h3>';
$result.='<form action="/adm/grades" method="post" name="displayPage">'."\n";
$result.=' <b>Problems from:</b> <select name="selectpage">'."\n";
@@ -3967,11 +3966,11 @@
&Apache::lonnet::clear_EXT_cache_status();
if (!&canview($usec)) {
- $request->print('<font color="red">Unable to view requested student.('.$env{'form.student'}.')</font>');
+ $request->print('<span class="LC_warning">Unable to view requested student.('.$env{'form.student'}.')</span>');
$request->print(&show_grading_menu_form($symb));
return;
}
- my $result='<h3><font color="#339933"> '.$env{'form.title'}.'</font></h3>';
+ my $result='<h3><span class="LC_info"> '.$env{'form.title'}.'</span></h3>';
$result.='<h3> Student: '.&nameUserString(undef,$$fullname{$env{'form.student'}},$uname,$udom).
'</h3>'."\n";
if (&Apache::lonnet::validCODE($env{'form.CODE'})) {
@@ -3986,7 +3985,7 @@
my ($mapUrl, $id, $resUrl)=&Apache::lonnet::decode_symb($env{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
if (!$map) {
- $request->print('<font color="red">Unable to view requested sequence. ('.$resUrl.')</font>');
+ $request->print('<span class="LC_warning">Unable to view requested sequence. ('.$resUrl.')</span>');
$request->print(&show_grading_menu_form($symb));
return;
}
@@ -4053,7 +4052,7 @@
if ($env{'form.lastSub'} eq 'datesub') {
if ($record{'version'} eq '') {
- $studentTable.='<br /> <font color="red">No recorded submission for this problem</font><br />';
+ $studentTable.='<br /> <span class="LC_warning">No recorded submission for this problem</span><br />';
} else {
my %responseType = ();
foreach my $partid (@{$parts}) {
@@ -4115,7 +4114,7 @@
my %orders;
$mark{'correct_by_student'} = $checkIcon;
if (!exists($$record{'1:timestamp'})) {
- return '<br /> <font color="red">Nothing submitted - no attempts</font><br />';
+ return '<br /> <span class="LC_warning">Nothing submitted - no attempts</span><br />';
}
my $interaction;
@@ -4149,8 +4148,8 @@
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/));
#&Apache::lonnet::logthis("match $matchKey $responseId (".$$record{$version.':'.$matchKey});
$displaySub[0].='<b>Part:</b> '.$display_part.' ';
- $displaySub[0].='<font color="#999999">(ID '.
- $responseId.')</font> <b>';
+ $displaySub[0].='<span class="LC_internal_info">(ID '.
+ $responseId.')</span> <b>';
if ($$record{"$where.$partid.tries"} eq '') {
$displaySub[0].='Trial not counted';
} else {
@@ -4215,11 +4214,11 @@
my ($uname,$udom) = split(/:/,$env{'form.student'});
my $usec=$classlist->{$env{'form.student'}}[5];
if (!&canmodify($usec)) {
- $request->print('<font color="red">Unable to modify requested student.('.$env{'form.student'}.'</font>');
+ $request->print('<span class="LC_warning">Unable to modify requested student.('.$env{'form.student'}.'</span>');
$request->print(&show_grading_menu_form($env{'form.symb'}));
return;
}
- my $result='<h3><font color="#339933"> '.$env{'form.title'}.'</font></h3>';
+ my $result='<h3><span class="LC_info"> '.$env{'form.title'}.'</span></h3>';
$result.='<h3> Student: '.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).
'</h3>'."\n";
@@ -4229,7 +4228,7 @@
my ($mapUrl, $id, $resUrl) = &Apache::lonnet::decode_symb( $env{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
if (!$map) {
- $request->print('<font color="red">Unable to grade requested sequence. ('.$resUrl.')</font>');
+ $request->print('<span class="LC_warning">Unable to grade requested sequence. ('.$resUrl.')</span>');
my ($symb)=&get_symb($request);
$request->print(&show_grading_menu_form($symb));
return;
@@ -4909,7 +4908,7 @@
}
}
if ($err) {
- $r->print("<font color='red'>Unable to accept last correction, an error occurred :$errmsg:</font>");
+ $r->print("<span class=\"LC_warning\">Unable to accept last correction, an error occurred :$errmsg:</span>");
} else {
&scantron_put_line($scanlines,$scan_data,$which,$line,$skip);
&scantron_putfile($scanlines,$scan_data);
@@ -4977,22 +4976,21 @@
$scantron_config{'CODEstart'} &&
$scantron_config{'CODElength'}) {
$CODElist=$env{'form.scantron_CODElist'};
- if ($env{'form.scantron_CODElist'} eq '') { $CODElist='<font color="red">None</font>'; }
+ if ($env{'form.scantron_CODElist'} eq '') { $CODElist='<span class="LC_warning">None</span>'; }
$CODElist=
'<tr><td><b>List of CODES to validate against:</b></td><td><tt>'.
$env{'form.scantron_CODElist'}.'</tt></td></tr>';
}
return (<<STUFF);
<p>
-<font color="red">Please double check the information
- below before clicking on '$button_text'</font>
+<span class="LC_warning">Please double check the information
+ below before clicking on '$button_text'</span>
</p>
<table>
<tr><td><b>Sequence to be Graded:</b></td><td>$title</td></tr>
<tr><td><b>Data File that will be used:</b></td><td><tt>$env{'form.scantron_selectfile'}</tt></td></tr>
$CODElist
</table>
-</font>
<br />
<p> If this information is correct, please click on '$button_text'.</p>
<p> If something is incorrect, please click the 'Grading Menu' button to start over.</p>
@@ -5012,13 +5010,13 @@
$env{'form.scantron_format'} eq '' ) {
$r->print("<p>You have forgetten to specify some information. Please go Back and try again.</p>");
if ( $env{'form.selectpage'} eq '') {
- $r->print('<p><font color="red">You have not selected a Sequence to grade</font></p>');
+ $r->print('<p><span class="LC_error">You have not selected a Sequence to grade</span></p>');
}
if ( $env{'form.scantron_selectfile'} eq '') {
- $r->print('<p><font color="red">You have not selected a file that contains the student\'s response data.</font></p>');
+ $r->print('<p><span class="LC_error">You have not selected a file that contains the student\'s response data.</span></p>');
}
if ( $env{'form.scantron_format'} eq '') {
- $r->print('<p><font color="red">You have not selected a the format of the student\'s response data.</font></p>');
+ $r->print('<p><span class="LC_error">You have not selected a the format of the student\'s response data.</span></p>');
}
} else {
my $warning=&scantron_warning_screen('Grading: Validate Records');
@@ -5870,13 +5868,13 @@
my $uploadedfile=$fname;
$fname='scantron_orig_'.$fname;
if (length($env{'form.upfile'}) < 2) {
- $r->print("<font color='red'>Error:</font> The file you attempted to upload, <tt>".&HTML::Entities::encode($env{'form.upfile.filename'},'<>&"')."</tt>, contained no information. Please check that you entered the correct filename.");
+ $r->print("<span class=\"LC_error\">Error:</span> The file you attempted to upload, <tt>".&HTML::Entities::encode($env{'form.upfile.filename'},'<>&"')."</tt>, contained no information. Please check that you entered the correct filename.");
} else {
my $result=&Apache::lonnet::finishuserfileupload($env{'form.courseid'},$env{'form.domainid'},'upfile',$fname);
if ($result =~ m|^/uploaded/|) {
- $r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($env{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>");
+ $r->print("<span class=\"LC_success\">Success:</span> Successfully uploaded ".(length($env{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>");
} else {
- $r->print("<font color='red'>Error:</font> An error (".$result.") occurred when attempting to upload the file, <tt>".&HTML::Entities::encode($env{'form.upfile.filename'},'<>&"')."</tt>");
+ $r->print("<span class=\"LC_error\">Error:</span> An error (".$result.") occurred when attempting to upload the file, <tt>".&HTML::Entities::encode($env{'form.upfile.filename'},'<>&"')."</tt>");
}
}
if ($symb) {
@@ -6005,7 +6003,7 @@
</script>
GRADINGMENUJS
&commonJSfunctions($request);
- my $result='<h3> <font color="#339933">Manual Grading/View Submission</font></h3>';
+ my $result='<h3> <span class="LC_info">Manual Grading/View Submission</span></h3>';
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle);
$result.=$table;
my (undef,$sections) = &getclasslist('all','0');
--albertel1178068659--