[system] / branches / rel-2-2-dev / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / ShowAnswers.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-2-dev/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2239 Revision 2427
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm,v 1.5 2004/04/04 15:18:25 jj Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm,v 1.6 2004/06/01 14:50:38 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
133 133
134 print "<CENTER>\n"; 134 print "<CENTER>\n";
135 print '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">',"\n"; 135 print '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">',"\n";
136 print "No entries for $safeUser set $safeSet, problem $safeProb" unless @lines; # warn if there are no answers 136 print "No entries for $safeUser set $safeSet, problem $safeProb" unless @lines; # warn if there are no answers
137 foreach $line (sort(@lines)) { 137 foreach $line (sort(@lines)) {
138 print $self->tableRow(split("\t",$line."\tx")); 138 print $self->tableRow(split("\t",substr($line,27),-1));
139 } 139 }
140 print qq{<TR><TD COLSPAN="$lastn"><HR SIZE="3"></TD></TR>\n} if ($lastn); 140 print qq{<TR><TD COLSPAN="$self->{lastn}"><HR SIZE="3"></TD></TR>\n</TABLE></TD></TR>\n}
141 if ($self->{lastn});
141 print "</TABLE>\n</CENTER>\n\n"; 142 print "</TABLE>\n</CENTER>\n\n";
142 } else { 143 } else {
143 print "<B>Can't open the access log $answer_log</B>"; 144 print "<B>Can't open the access log $answer_log</B>";
144 } 145 }
145 } 146 }
169 ($studentUser,$set,$prob) = (split('\|',$ID))[1,2,3]; 170 ($studentUser,$set,$prob) = (split('\|',$ID))[1,2,3];
170 $out .= qq{<TR ALIGN="CENTER"><TD COLSPAN="$n"><HR SIZE="3"> 171 $out .= qq{<TR ALIGN="CENTER"><TD COLSPAN="$n"><HR SIZE="3">
171 User: <B>$studentUser</B> &nbsp; 172 User: <B>$studentUser</B> &nbsp;
172 Set: <B>$set</B> &nbsp; 173 Set: <B>$set</B> &nbsp;
173 Problem: <B>$prob</B></TD></TR>\n}; 174 Problem: <B>$prob</B></TD></TR>\n};
174 $lastID = $ID; $lasttime = 0; $lastdate = ""; 175 $self->{lastID} = $lastID = $ID;
176 $self->{lasttime} = $lasttime = 0;
177 $self->{lastdate} = $lastdate = "";
175 } 178 }
176 179
177 $out .= qq{<TR><TD COLSPAN="$n"><HR SIZE="1"></TD></TR>\n} 180 $out .= qq{<TR><TD COLSPAN="$n"><HR SIZE="1"></TD></TR>\n}
178 if ($rtime - $lasttime > 30*60); 181 if ($rtime - $lasttime > 30*60);
179 $lasttime = $rtime; $lastn = $n; 182 $self->{lasttime} = $lasttime = $rtime;
183 $self->{lastn} = $lastn = $n;
180 184
181 if ($lastdate ne $date) { 185 if ($lastdate ne $date) {
182 $out .= qq{<TR><TD COLSPAN="$n"><SMALL><I>$date</I></SMALL></TD></TR>\n}; 186 $out .= qq{<TR><TD COLSPAN="$n"><SMALL><I>$date</I></SMALL></TD></TR>\n};
183 $lastdate = $date; 187 $self->{lastdate} = $lastdate = $date;
184 } 188 }
185 189
186 $out .= '<TR><TD WIDTH="10"></TD>'. 190 $out .= '<TR><TD WIDTH="10"></TD>'.
187 '<TD><FONT COLOR="#808080"><SMALL>'.$time.'</SMALL></FONT></TD>'; 191 '<TD><FONT COLOR="#808080"><SMALL>'.$time.'</SMALL></FONT></TD>';
188 foreach $answer (@answers) { 192 foreach $answer (@answers) {

Legend:
Removed from v.2239  
changed lines
  Added in v.2427

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9