Annotation of loncom/homework/inputtags.pm, revision 1.187
1.43 albertel 1: # The LearningOnline Network with CAPA
2: # input definitons
1.47 albertel 3: #
1.187 ! albertel 4: # $Id: inputtags.pm,v 1.186 2006/01/04 05:56:16 albertel Exp $
1.47 albertel 5: #
6: # Copyright Michigan State University Board of Trustees
7: #
8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
9: #
10: # LON-CAPA is free software; you can redistribute it and/or modify
11: # it under the terms of the GNU General Public License as published by
12: # the Free Software Foundation; either version 2 of the License, or
13: # (at your option) any later version.
14: #
15: # LON-CAPA is distributed in the hope that it will be useful,
16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18: # GNU General Public License for more details.
19: #
20: # You should have received a copy of the GNU General Public License
21: # along with LON-CAPA; if not, write to the Free Software
22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23: #
24: # /home/httpd/html/adm/gpl.txt
25: #
26: # http://www.lon-capa.org/
1.1 albertel 27:
28: package Apache::inputtags;
1.55 albertel 29: use HTML::Entities();
1.1 albertel 30: use strict;
1.82 www 31: use Apache::loncommon;
1.115 www 32: use Apache::lonlocal;
1.165 albertel 33: use Apache::lonnet;
1.1 albertel 34:
1.50 harris41 35: BEGIN {
1.135 albertel 36: &Apache::lonxml::register('Apache::inputtags',('hiddenline','textfield','textline'));
1.1 albertel 37: }
38:
1.177 foxr 39: # Initializes a set of global variables used during the parse of the problem.
40: #
1.178 albertel 41: # @Apache::inputtags::input - List of current input ids.
42: # @Apache::inputtags::inputlist - List of all input ids seen this problem.
43: # @Apache::inputtags::response - List of all current resopnse ids.
44: # @Apache::inputtags::responselist - List of all response ids seen this
45: # problem.
46: # @Apache::inputtags::hint - List of all hint ids.
47: # @Apache::inputtags::hintlist - List of all hint ids seen this problem.
48: # @Apache::inputtags::previous - List describing if specific responseds
49: # have been used
50: # @Apache::inputtags::previous_version - Submission responses were used in.
51: # $Apache::inputtags::part - Current part id (valid only in
52: # <problem>)
53: # 0 if not in a part.
54: # @Apache::inputtags::partlist - List of part ids seen in the current
55: # <problem>
56: # @Apache::inputtags::status - List of problem statuses. First
57: # element is the status of the <problem>
58: # the remainder are for individual <part>s.
59: # %Apache::inputtags::params - Hash of defined parameters for the
60: # current response.
61: # @Apache::inputtags::import - List of all ids for <import> thes get
62: # join()ed and prepended.
63: # @Apache::inputtags::importlist - List of all import ids seen.
64: # $Apache::inputtags::response_with_no_part
65: # - Flag set true if we have seen a response
66: # that is not inside a <part>
67: # %Apache::inputtags::answertxt - <*response> tags store correct
68: # answer strings for display by <textline/>
69: # in this hash.
70:
1.1 albertel 71: sub initialize_inputtags {
1.135 albertel 72: @Apache::inputtags::input=();
73: @Apache::inputtags::inputlist=();
1.174 albertel 74: @Apache::inputtags::response=();
1.135 albertel 75: @Apache::inputtags::responselist=();
1.174 albertel 76: @Apache::inputtags::hint=();
1.173 albertel 77: @Apache::inputtags::hintlist=();
1.135 albertel 78: @Apache::inputtags::previous=();
79: @Apache::inputtags::previous_version=();
80: $Apache::inputtags::part='';
81: @Apache::inputtags::partlist=();
82: @Apache::inputtags::status=();
83: %Apache::inputtags::params=();
84: @Apache::inputtags::import=();
85: @Apache::inputtags::importlist=();
86: $Apache::inputtags::response_with_no_part=0;
1.144 albertel 87: %Apache::inputtags::answertxt=();
1.103 albertel 88: }
89:
90: sub check_for_duplicate_ids {
91: my %check;
92: foreach my $id (@Apache::inputtags::partlist,
93: @Apache::inputtags::responselist,
1.173 albertel 94: @Apache::inputtags::hintlist,
1.103 albertel 95: @Apache::inputtags::importlist) {
96: $check{$id}++;
97: }
98: my @duplicates;
99: foreach my $id (sort(keys(%check))) {
100: if ($check{$id} > 1) {
101: push(@duplicates,$id);
102: }
103: }
104: if (@duplicates) {
105: &Apache::lonxml::error("Duplicated ids found, problem will operate incorrectly. Duplicated ids seen: ",join(', ',@duplicates));
106: }
1.1 albertel 107: }
108:
1.14 albertel 109: sub start_input {
1.135 albertel 110: my ($parstack,$safeeval)=@_;
111: my $id = &Apache::lonxml::get_param('id',$parstack,$safeeval);
112: if ($id eq '') { $id = $Apache::lonxml::curdepth; }
113: push (@Apache::inputtags::input,$id);
114: push (@Apache::inputtags::inputlist,$id);
115: return $id;
1.14 albertel 116: }
117:
118: sub end_input {
1.135 albertel 119: pop @Apache::inputtags::input;
120: return '';
1.14 albertel 121: }
122:
1.124 www 123: sub addchars {
124: my ($fieldid,$addchars)=@_;
125: my $output='';
126: foreach (split(/\,/,$addchars)) {
127: $output.='<a href="javascript:void(document.forms.lonhomework.'.
128: $fieldid.'.value+=\''.$_.'\')">'.$_.'</a> ';
129: }
130: return $output;
131: }
132:
1.48 albertel 133: sub start_textfield {
1.185 albertel 134: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.135 albertel 135: my $result = "";
136: my $id = &start_input($parstack,$safeeval);
137: my $resid=$Apache::inputtags::response[-1];
138: if ($target eq 'web') {
139: $Apache::lonxml::evaluate--;
140: if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
141: my $partid=$Apache::inputtags::part;
1.138 albertel 142: my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"},'<>&"');
1.135 albertel 143: my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
144: if ( $cols eq '') { $cols = 80; }
145: my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);
1.143 www 146: if ( $rows eq '') { $rows = 16; }
1.135 albertel 147: my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval);
148: $result='';
149: if ($addchars) {
150: $result.=&addchars('HWVAL_'.$resid,$addchars);
151: }
1.143 www 152: push @Apache::lonxml::htmlareafields,'HWVAL_'.$resid;
153: $result.= '<textarea wrap="hard" name="HWVAL_'.$resid.'" id="HWVAL_'.$resid.'" '.
1.135 albertel 154: "rows=\"$rows\" cols=\"$cols\">".$oldresponse;
155: if ($oldresponse ne '') {
1.143 www 156:
1.135 albertel 157: #get rid of any startup text if the user has already responded
1.185 albertel 158: &Apache::lonxml::get_all_text("/textfield",$parser,$style);
1.135 albertel 159: }
160: } else {
161: #right or wrong don't show it
162: #$result='<table border="1"><tr><td><i>'.$oldresponse.'</i></td></tr></table>';
163: $result='';
164: #get rid of any startup text
1.185 albertel 165: &Apache::lonxml::get_all_text("/textfield",$parser,$style);
1.61 albertel 166: }
1.135 albertel 167: } elsif ($target eq 'grade') {
1.185 albertel 168: my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser,
169: $style);
1.165 albertel 170: if ($seedtext eq $env{'form.HWVAL_'.$resid}) {
1.135 albertel 171: # if the seed text is still there it wasn't a real submission
1.165 albertel 172: $env{'form.HWVAL_'.$resid}='';
1.135 albertel 173: }
174: } elsif ($target eq 'edit') {
175: $result.=&Apache::edit::tag_start($target,$token);
176: $result.=&Apache::edit::text_arg('Rows:','rows',$token,4);
177: $result.=&Apache::edit::text_arg('Columns:','cols',$token,4);
178: $result.=&Apache::edit::text_arg
179: ('Click-On Texts (comma sep):','addchars',$token,10);
1.185 albertel 180: my $bodytext=&Apache::lonxml::get_all_text("/textfield",$parser,
181: $style);
1.135 albertel 182: $result.=&Apache::edit::editfield($token->[1],$bodytext,'Text you want to appear by default:',80,2);
183: } elsif ($target eq 'modified') {
184: my $constructtag=&Apache::edit::get_new_args($token,$parstack,
185: $safeeval,'rows','cols',
186: 'addchars');
187: if ($constructtag) {
188: $result = &Apache::edit::rebuild_tag($token);
189: } else {
190: $result=$token->[4];
191: }
192: $result.=&Apache::edit::modifiedfield("/textfield",$parser);
193: } elsif ($target eq 'tex') {
194: my $number_of_lines = &Apache::lonxml::get_param('rows',$parstack,$safeeval);
195: my $width_of_box = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
196: if ($$tagstack[-2] eq 'essayresponse' and $Apache::lonhomework::type eq 'exam') {
197: $result = '\fbox{\fbox{\parbox{\textwidth-5mm}{';
198: for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';}
199: $result.='\strut \\\\\strut \\\\\strut \\\\\strut \\\\}}}';
200: } else {
201: my $TeXwidth=$width_of_box/80;
202: $result = '\vskip 1 mm \fbox{\fbox{\parbox{'.$TeXwidth.'\textwidth-5mm}{';
203: for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';}
204: $result.='}}}\vskip 2 mm ';
205: }
1.60 albertel 206: }
1.135 albertel 207: return $result;
1.6 albertel 208: }
209:
1.48 albertel 210: sub end_textfield {
1.135 albertel 211: my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
212: my $result;
213: if ($target eq 'web') {
214: $Apache::lonxml::evaluate++;
215: if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
216: return "</textarea>";
217: }
218: } elsif ($target eq 'edit') {
219: $result=&Apache::edit::end_table();
220: }
221: &end_input;
222: return $result;
1.6 albertel 223: }
224:
1.1 albertel 225: sub start_textline {
1.135 albertel 226: my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
227: my $result = "";
228: if ($target eq 'web') {
229: $Apache::lonxml::evaluate--;
230: my $partid=$Apache::inputtags::part;
231: my $id=$Apache::inputtags::response[-1];
232: if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
233: my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
234: my $maxlength;
235: if ($size eq '') { $size=20; } else {
236: if ($size < 20) { $maxlength=$size; }
237: }
1.138 albertel 238: my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"},'<>&"');
1.135 albertel 239: if ($Apache::lonhomework::type ne 'exam') {
240: my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval);
241: $result='';
242: if ($addchars) {
243: $result.=&addchars('HWVAL_'.$id,$addchars);
244: }
1.157 albertel 245: my $readonly=&Apache::lonxml::get_param('readonly',$parstack,
246: $safeeval);
247: if (lc($readonly) eq 'yes') {
248: $readonly=' readonly="readonly" ';
1.158 albertel 249: } else {
250: $readonly='';
1.157 albertel 251: }
252: $result.= '<input type="text" '.$readonly.' name="HWVAL_'.$id.'" value="'.
1.135 albertel 253: $oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />';
254: }
255: } else {
256: #right or wrong don't show what was last typed in.
1.168 albertel 257: $result='<b>'.$Apache::inputtags::answertxt{$id}.'</b>';
1.144 albertel 258: #$result='';
1.135 albertel 259: }
260: } elsif ($target eq 'edit') {
261: $result=&Apache::edit::tag_start($target,$token);
262: $result.=&Apache::edit::text_arg('Size:','size',$token,'5').
1.157 albertel 263: &Apache::edit::text_arg('Click-On Texts (comma sep):',
264: 'addchars',$token,10);
265: $result.=&Apache::edit::select_arg('Readonly:','readonly',
266: ['no','yes'],$token);
267: $result.=&Apache::edit::end_row();
268: $result.=&Apache::edit::end_table();
1.135 albertel 269: } elsif ($target eq 'modified') {
1.157 albertel 270: my $constructtag=&Apache::edit::get_new_args($token,$parstack,
271: $safeeval,'size',
272: 'addchars','readonly');
1.135 albertel 273: if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
274: } elsif ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') {
275: my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
276: if ($size != 0) {$size=$size*2; $size.=' mm';} else {$size='40 mm';}
277: $result='\framebox['.$size.'][s]{\tiny\strut}';
278: }
279: return $result;
1.1 albertel 280: }
281:
282: sub end_textline {
1.135 albertel 283: my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
284: if ($target eq 'web') { $Apache::lonxml::evaluate++; }
285: elsif ($target eq 'edit') { return ('','no'); }
286: return "";
1.9 albertel 287: }
288:
1.98 albertel 289: sub start_hiddenline {
290: my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
291: my $result = "";
292: if ($target eq 'web') {
293: $Apache::lonxml::evaluate--;
294: if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
295: my $partid=$Apache::inputtags::part;
296: my $id=$Apache::inputtags::response[-1];
1.138 albertel 297: my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"},'<>&"');
1.98 albertel 298: if ($Apache::lonhomework::type ne 'exam') {
299: $result= '<input type="hidden" name="HWVAL_'.$id.'" value="'.
300: $oldresponse.'" />';
301: }
302: }
303: } elsif ($target eq 'edit') {
304: $result=&Apache::edit::tag_start($target,$token);
305: $result.=&Apache::edit::end_table;
306: }
307: return $result;
308: }
309:
310: sub end_hiddenline {
1.135 albertel 311: my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
312: if ($target eq 'web') { $Apache::lonxml::evaluate++; }
313: elsif ($target eq 'edit') { return ('','no'); }
314: return "";
1.98 albertel 315: }
316:
1.160 albertel 317: # $part -> partid
318: # $id -> responseid
319: # $uploadefiletypes -> comma seperated list of extensions allowed or * for any
320: # $which -> 'uploadedonly' -> only newly uploaded files
321: # 'portfolioonly' -> only allow files from portfolio
322: # 'both' -> allow files from either location
1.175 albertel 323: # $extratext -> additional text to go between the link and the input box
1.160 albertel 324: # returns a table row <tr>
325: sub file_selector {
1.175 albertel 326: my ($part,$id,$uploadedfiletypes,$which,$extratext)=@_;
1.160 albertel 327: if (!$uploadedfiletypes) { return ''; }
1.167 albertel 328:
329: my $jspart=$part;
330: $jspart=~s/\./_/g;
331:
1.160 albertel 332: my $result;
333:
1.162 albertel 334: $result.='<tr><td>';
335: if ($uploadedfiletypes ne '*') {
336: $result.=
337: &mt('Allowed filetypes: <b>[_1]</b>',$uploadedfiletypes).'<br />';
338: }
1.160 albertel 339: if ($which eq 'uploadonly' || $which eq 'both') {
340: $result.=&mt('Submit a file: (only one file can be uploaded)').
341: ' <br /><input type="file" size="50" name="HWFILE'.
1.167 albertel 342: $jspart.'_'.$id.'" /><br />';
1.160 albertel 343: my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"},'<>&"');
344:
345: if ($uploadedfile) {
346: my $url=$Apache::lonhomework::history{"resource.$part.$id.uploadedurl"};
1.176 albertel 347: &Apache::lonxml::extlink($url);
1.160 albertel 348: &Apache::lonnet::allowuploaded('/adm/essayresponse',$url);
349: my $icon=&Apache::loncommon::icon($url);
350: my $curfile='<a href="'.$url.'"><img src="'.$icon.
351: '" border="0" />'.$uploadedfile.'</a>';
352: $result.=&mt('Currently submitted: <tt>[_1]</tt>',$curfile);
353: } else {
354: #$result.=&mt('(Hand in a file you have prepared on your computer)');
355: }
356: }
357: if ( $which eq 'both') {
358: $result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />';
359: }
360: if ($which eq 'portfolioonly' || $which eq 'both') {
1.175 albertel 361: $result.=$extratext.'<a href='."'".'javascript:void(window.open("/adm/portfolio?mode=selectfile&fieldname=HWPORT'.$jspart.'_'.$id.'","cat","height=600,width=800,scrollbars=1,resizable=1,menubar=2,location=1"))'."'".'>'.
1.160 albertel 362: &mt('Select Portfolio Files').'</a><br />'.
1.167 albertel 363: '<input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" />'.
1.160 albertel 364: '<br />';
365: if ($Apache::lonhomework::history{"resource.$part.$id.portfiles"}=~/[^\s]/){
1.187 ! albertel 366: my (@filelist,@bad_file_list);
1.160 albertel 367: foreach my $file (split(',',&Apache::lonnet::unescape($Apache::lonhomework::history{"resource.$part.$id.portfiles"}))) {
368: my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser();
369: my $url="/uploaded/$domain/$user/portfolio$file";
370: my $icon=&Apache::loncommon::icon($url);
1.161 albertel 371: push(@filelist,'<a href="'.$url.'"><img src="'.$icon.
372: '" border="0" />'.$file.'</a>');
1.187 ! albertel 373: if (! &Apache::lonnet::stat_file($url)) {
! 374: push(@bad_file_list,'<a href="'.$url.'"><img src="'.$icon.
! 375: '" border="0" />'.$file.'</a>');
! 376: }
1.160 albertel 377: }
1.161 albertel 378: $result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",join(', ',@filelist));
1.187 ! albertel 379: if (@bad_file_list) {
! 380: $result.='<br />'.&mt('<font color="red">These file(s) don\'t exist:</font> <strong>[_1]</strong>',join(', ',@bad_file_list));
! 381: }
1.160 albertel 382: }
383: }
384: $result.='</td></tr>';
385: return $result;
386: }
387:
1.136 albertel 388: sub checkstatus {
389: my ($value,$awardref,$msgref)=@_;
390: for (my $i=0;$i<=$#$awardref;$i++) {
391: if ($$awardref[$i] eq $value) {
392: return ($$awardref[$i],$$msgref[$i]);
393: }
394: }
395: return(undef,undef);
396: }
397:
1.179 albertel 398: sub valid_award {
399: my ($award) =@_;
1.182 albertel 400: foreach my $possibleaward ('EXTRA_ANSWER','MISSING_ANSWER', 'ERROR',
401: 'NO_RESPONSE',
1.179 albertel 402: 'TOO_LONG', 'UNIT_INVALID_INSTRUCTOR',
403: 'UNIT_INVALID_STUDENT', 'UNIT_IRRECONCIBLE',
404: 'UNIT_FAIL', 'NO_UNIT',
405: 'UNIT_NOTNEEDED', 'WANTED_NUMERIC',
406: 'BAD_FORMULA', 'SIG_FAIL', 'INCORRECT',
407: 'MISORDERED_RANK', 'INVALID_FILETYPE',
408: 'DRAFT', 'SUBMITTED', 'ASSIGNED_SCORE',
409: 'APPROX_ANS', 'EXACT_ANS','COMMA_FAIL') {
410: if ($award eq $possibleaward) { return 1; }
411: }
412: return 0;
413: }
414:
1.9 albertel 415: sub finalizeawards {
1.181 albertel 416: my ($awardref,$msgref,$nameref,$reverse)=@_;
1.136 albertel 417: my $result=undef;
1.135 albertel 418: my $award;
1.136 albertel 419: my $msg;
420: if ($#$awardref == -1) { $result = "NO_RESPONSE"; }
1.135 albertel 421: if ($result eq '' ) {
422: my $blankcount;
1.136 albertel 423: foreach $award (@$awardref) {
1.135 albertel 424: if ($award eq '') {
425: $result='MISSING_ANSWER';
426: $blankcount++;
427: }
428: }
1.136 albertel 429: if ($blankcount == ($#$awardref + 1)) { $result = 'NO_RESPONSE'; }
1.135 albertel 430: }
1.136 albertel 431: if (defined($result)) { return ($result,$msg); }
1.181 albertel 432:
433: # these awards are ordered from most important error through best correct
434:
1.182 albertel 435: my @awards = ('EXTRA_ANSWER', 'MISSING_ANSWER', 'ERROR', 'NO_RESPONSE',
436: 'TOO_LONG',
1.181 albertel 437: 'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT',
438: 'UNIT_IRRECONCIBLE', 'UNIT_FAIL', 'NO_UNIT',
439: 'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA',
440: 'COMMA_FAIL', 'SIG_FAIL', 'INCORRECT', 'MISORDERED_RANK',
441: 'INVALID_FILETYPE', 'DRAFT', 'SUBMITTED', 'ASSIGNED_SCORE',
442: 'APPROX_ANS', 'EXACT_ANS');
443: if ($reverse) { @awards=reverse(@awards); }
444: foreach my $possibleaward (@awards) {
1.136 albertel 445: ($result,$msg)=&checkstatus($possibleaward,$awardref,$msgref);
446: if (defined($result)) { return ($result,$msg); }
1.135 albertel 447: }
1.136 albertel 448: return ('ERROR',undef);
1.9 albertel 449: }
450:
1.10 albertel 451: sub decideoutput {
1.169 albertel 452: my ($award,$awarded,$awardmsg,$solved,$previous,$target)=@_;
1.135 albertel 453: my $message='';
454: my $button=0;
455: my $previousmsg;
456: my $bgcolor='orange';
1.148 albertel 457: my $added_computer_text=0;
1.135 albertel 458: my %possiblecolors =
459: ( 'correct' => '#aaffaa',
460: 'charged_try' => '#ffaaaa',
461: 'not_charged_try' => '#ffffaa',
462: 'no_message' => '#fffff',
463: );
1.169 albertel 464:
1.180 albertel 465: my $part = $Apache::inputtags::part;
466: my $handgrade =
467: ('yes' eq lc(&Apache::lonnet::EXT("resource.$part.handgrade")));
468:
469: my $computer = ($handgrade)? ''
470: : " ".&mt("Computer's answer now shown above.");
471: &Apache::lonxml::debug("handgrade has :$handgrade:");
472:
1.135 albertel 473: if ($previous) { $previousmsg=&mt('You have entered that answer before'); }
474:
475: if ($solved =~ /^correct/) {
1.169 albertel 476: $bgcolor=$possiblecolors{'correct'};
1.170 albertel 477: $message=&mt('You are correct.');
478: if ($awarded < 1 && $awarded > 0) {
479: $message=&mt('You are partially correct.');
480: $bgcolor=$possiblecolors{'not_charged_try'};
481: } elsif ($awarded < 1) {
482: $message=&mt('Incorrect.');
483: $bgcolor=$possiblecolors{'charged_try'};
484: }
1.172 albertel 485: if ($env{'request.filename'} =~
486: m|/res/lib/templates/examupload.problem$|) {
487: $message = &mt("A score has been assigned.");
488: $added_computer_text=1;
1.135 albertel 489: } else {
1.172 albertel 490: if ($target eq 'tex') {
491: $message = '\textbf{'.$message.'}';
492: } else {
493: $message = "<b>".$message."</b>";
1.180 albertel 494: $message.= $computer;
1.135 albertel 495: }
1.172 albertel 496: $added_computer_text=1;
1.165 albertel 497: unless ($env{'course.'.
498: $env{'request.course.id'}.
1.135 albertel 499: '.disable_receipt_display'} eq 'yes') {
500: $message.=(($target eq 'web')?'<br />':' ').
501: &mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
502: (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
503: }
504: }
505: $button=0;
506: $previousmsg='';
507: } elsif ($solved =~ /^excused/) {
508: if ($target eq 'tex') {
509: $message = ' \textbf{'.&mt('You are excused from the problem.').'} ';
510: } else {
511: $message = "<b>".&mt('You are excused from the problem.')."</b>";
512: }
513: $bgcolor=$possiblecolors{'charged_try'};
514: $button=0;
515: $previousmsg='';
516: } elsif ($award eq 'EXACT_ANS' || $award eq 'APPROX_ANS' ) {
517: if ($solved =~ /^incorrect/ || $solved eq '') {
1.144 albertel 518: $message = &mt("Incorrect").".";
1.135 albertel 519: $bgcolor=$possiblecolors{'charged_try'};
520: $button=1;
521: } else {
1.144 albertel 522: if ($target eq 'tex') {
523: $message = '\textbf{'.&mt('You are correct.').'}';
524: } else {
525: $message = "<b>".&mt('You are correct.')."</b>";
1.180 albertel 526: $message.= $computer;
1.144 albertel 527: }
1.148 albertel 528: $added_computer_text=1;
1.165 albertel 529: unless ($env{'course.'.
530: $env{'request.course.id'}.
1.135 albertel 531: '.disable_receipt_display'} eq 'yes') {
532: $message.=(($target eq 'web')?'<br />':' ').
533: 'Your receipt is '.&Apache::lonnet::receipt($Apache::inputtags::part).
534: (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
535: }
536: $bgcolor=$possiblecolors{'correct'};
537: $button=0;
538: $previousmsg='';
539: }
540: } elsif ($award eq 'NO_RESPONSE') {
541: $message = '';
542: $bgcolor=$possiblecolors{'no_feedback'};
543: $button=1;
1.182 albertel 544: } elsif ($award eq 'EXTRA_ANSWER') {
545: $message = &mt('Some extra items were submitted.');
546: $bgcolor=$possiblecolors{'not_charged_try'};
547: $button = 1;
1.135 albertel 548: } elsif ($award eq 'MISSING_ANSWER') {
549: $message = &mt('Some items were not submitted.');
550: $bgcolor=$possiblecolors{'not_charged_try'};
551: $button = 1;
552: } elsif ($award eq 'ERROR') {
553: $message = &mt('An error occured while grading your answer.');
554: $bgcolor=$possiblecolors{'not_charged_try'};
555: $button = 1;
556: } elsif ($award eq 'TOO_LONG') {
557: $message = &mt("The submitted answer was too long.");
558: $bgcolor=$possiblecolors{'not_charged_try'};
559: $button=1;
560: } elsif ($award eq 'WANTED_NUMERIC') {
561: $message = &mt("This question expects a numeric answer.");
562: $bgcolor=$possiblecolors{'not_charged_try'};
563: $button=1;
564: } elsif ($award eq 'MISORDERED_RANK') {
565: $message = &mt('You have provided an invalid ranking');
566: if ($target ne 'tex') {
1.159 albertel 567: $message.=', '.&mt('please refer to').' '.&Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems');
1.135 albertel 568: }
569: $bgcolor=$possiblecolors{'not_charged_try'};
570: $button=1;
571: } elsif ($award eq 'INVALID_FILETYPE') {
1.166 albertel 572: $message = &mt('Submission won\'t be graded. The type of file submitted is not allowed.');
1.135 albertel 573: $bgcolor=$possiblecolors{'not_charged_try'};
574: $button=1;
575: } elsif ($award eq 'SIG_FAIL') {
1.145 albertel 576: my ($used,$min,$max)=split(':',$awardmsg);
577: my $word;
578: if ($used < $min) { $word=&mt('more'); }
579: if ($used > $max) { $word=&mt('fewer'); }
580: $message = &mt("Submission not graded. Use [_2] digits.",$used,$word);
1.135 albertel 581: $bgcolor=$possiblecolors{'not_charged_try'};
582: $button=1;
1.137 albertel 583: } elsif ($award eq 'UNIT_INVALID_INSTRUCTOR') {
584: $message = &mt('Error in instructor specifed unit. This error has been reported to the instructor.', $awardmsg);
585: if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');}
586: $bgcolor=$possiblecolors{'not_charged_try'};
587: $button=1;
588: } elsif ($award eq 'UNIT_INVALID_STUDENT') {
1.155 albertel 589: $message = &mt('Unable to interpret units. Computer reads units as "[_1]".',&markup_unit($awardmsg,$target));
1.137 albertel 590: if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');}
591: $bgcolor=$possiblecolors{'not_charged_try'};
592: $button=1;
1.140 matthew 593: } elsif ($award eq 'UNIT_FAIL' || $award eq 'UNIT_IRRECONCIBLE') {
1.155 albertel 594: $message = &mt('Incompatible units. No conversion found between "[_1]" and the required units.',&markup_unit($awardmsg,$target));
1.136 albertel 595: if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');}
1.135 albertel 596: $bgcolor=$possiblecolors{'not_charged_try'};
597: $button=1;
598: } elsif ($award eq 'UNIT_NOTNEEDED') {
1.155 albertel 599: $message = &mt('Only a number required. Computer reads units of "[_1]".',&markup_unit($awardmsg,$target));
1.135 albertel 600: $bgcolor=$possiblecolors{'not_charged_try'};
601: $button=1;
602: } elsif ($award eq 'NO_UNIT') {
1.144 albertel 603: $message = &mt("Units required").'.';
1.135 albertel 604: if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units')};
605: $bgcolor=$possiblecolors{'not_charged_try'};
606: $button=1;
1.153 albertel 607: } elsif ($award eq 'COMMA_FAIL') {
608: $message = &mt("Proper comma separation is required").'.';
609: $bgcolor=$possiblecolors{'not_charged_try'};
610: $button=1;
1.135 albertel 611: } elsif ($award eq 'BAD_FORMULA') {
612: $message = &mt("Unable to understand formula");
613: $bgcolor=$possiblecolors{'not_charged_try'};
614: $button=1;
615: } elsif ($award eq 'INCORRECT') {
1.144 albertel 616: $message = &mt("Incorrect").'.';
1.135 albertel 617: $bgcolor=$possiblecolors{'charged_try'};
618: $button=1;
619: } elsif ($award eq 'SUBMITTED') {
620: $message = &mt("Your submission has been recorded.");
621: $bgcolor=$possiblecolors{'correct'};
622: $button=1;
623: } elsif ($award eq 'DRAFT') {
1.144 albertel 624: $message = &mt("A draft copy has been saved.");
1.135 albertel 625: $bgcolor=$possiblecolors{'not_charged_try'};
626: $button=1;
627: } elsif ($award eq 'ASSIGNED_SCORE') {
1.144 albertel 628: $message = &mt("A score has been assigned.");
1.135 albertel 629: $bgcolor=$possiblecolors{'correct'};
630: $button=0;
1.144 albertel 631: } elsif ($award eq '') {
1.186 albertel 632: if ($handgrade && $Apache::inputtags::status[-1] eq 'SHOW_ANSWER') {
633: $message = &mt("Nothing submitted.");
634: $bgcolor=$possiblecolors{'charged_try'};
635: } else {
636: $bgcolor=$possiblecolors{'not_charged_try'};
637: }
1.144 albertel 638: $button=1;
1.135 albertel 639: } else {
640: $message = &mt("Unknown message").": $award";
641: $button=1;
642: }
643: if (lc($Apache::lonhomework::problemstatus) eq 'no' &&
644: $Apache::inputtags::status[-1] ne 'SHOW_ANSWER') {
645: $message = &mt("Answer Submitted: Your final submission will be graded after the due date.");
646: $bgcolor=$possiblecolors{'correct'};
647: $button=1;
648: }
1.148 albertel 649: if ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER' &&
1.150 albertel 650: !$added_computer_text && $target ne 'tex') {
1.180 albertel 651: $message.= $computer;
1.148 albertel 652: $added_computer_text=1;
1.144 albertel 653: }
1.135 albertel 654: return ($button,$bgcolor,$message,$previousmsg);
1.12 albertel 655: }
656:
1.155 albertel 657: sub markup_unit {
658: my ($unit,$target)=@_;
659: if ($target eq 'tex') {
660: return '\texttt{'.&Apache::lonxml::latex_special_symbols($unit).'}';
661: } else {
662: return "<tt>".$unit."</tt>";
663: }
664: }
665:
1.88 albertel 666: sub removealldata {
1.87 albertel 667: my ($id)=@_;
668: foreach my $key (keys(%Apache::lonhomework::results)) {
669: if (($key =~ /^resource\.\Q$id\E\./) && ($key !~ /\.collaborators$/)) {
670: &Apache::lonxml::debug("Removing $key");
671: delete($Apache::lonhomework::results{$key});
672: }
673: }
674: }
675:
1.142 albertel 676: sub hidealldata {
677: my ($id)=@_;
678: foreach my $key (keys(%Apache::lonhomework::results)) {
679: if (($key =~ /^resource\.\Q$id\E\./) && ($key !~ /\.collaborators$/)) {
680: &Apache::lonxml::debug("Hidding $key");
681: my $newkey=$key;
682: $newkey=~s/^(resource\.\Q$id\E\.[^\.]+\.)(.*)$/${1}hidden${2}/;
683: $Apache::lonhomework::results{$newkey}=
684: $Apache::lonhomework::results{$key};
685: delete($Apache::lonhomework::results{$key});
686: }
687: }
688: }
689:
1.12 albertel 690: sub setgradedata {
1.136 albertel 691: my ($award,$msg,$id,$previously_used) = @_;
1.154 albertel 692: if ($Apache::lonhomework::scantronmode &&
1.165 albertel 693: &Apache::lonnet::validCODE($env{'form.CODE'})) {
694: $Apache::lonhomework::results{"resource.CODE"}=$env{'form.CODE'};
1.154 albertel 695: } elsif ($Apache::lonhomework::scantronmode &&
1.165 albertel 696: $env{'form.CODE'} eq '' &&
1.154 albertel 697: $Apache::lonhomework::history{"resource.CODE"} ne '') {
698: $Apache::lonhomework::results{"resource.CODE"}='';
1.141 albertel 699: }
1.154 albertel 700:
1.135 albertel 701: if (!$Apache::lonhomework::scantronmode &&
702: $Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&
703: $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {
704: $Apache::lonhomework::results{"resource.$id.afterduedate"}=$award;
1.87 albertel 705: return '';
1.135 albertel 706: } elsif ( $Apache::lonhomework::history{"resource.$id.solved"} !~
707: /^correct/ || $Apache::lonhomework::scantronmode ||
708: lc($Apache::lonhomework::problemstatus) eq 'no') {
1.154 albertel 709: # the student doesn't already have it correct,
710: # or we are in a mode (scantron orno problem status) where a correct
711: # can become incorrect
712: # handle assignment of tries and solved status
1.135 albertel 713: my $solvemsg;
714: if ($Apache::lonhomework::scantronmode) {
715: $solvemsg='correct_by_scantron';
716: } else {
717: $solvemsg='correct_by_student';
718: }
719: if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) {
720: $Apache::lonhomework::results{"resource.$id.afterduedate"}='';
721: }
722: if ( $award eq 'ASSIGNED_SCORE') {
723: $Apache::lonhomework::results{"resource.$id.tries"} =
724: $Apache::lonhomework::history{"resource.$id.tries"} + 1;
725: $Apache::lonhomework::results{"resource.$id.solved"} =
726: $solvemsg;
727: my $numawards=scalar(@Apache::inputtags::response);
728: $Apache::lonhomework::results{"resource.$id.awarded"} = 0;
729: foreach my $res (@Apache::inputtags::response) {
730: $Apache::lonhomework::results{"resource.$id.awarded"}+=
731: $Apache::lonhomework::results{"resource.$id.$res.awarded"};
732: }
733: if ($numawards > 0) {
734: $Apache::lonhomework::results{"resource.$id.awarded"}/=
735: $numawards;
736: }
737: } elsif ( $award eq 'APPROX_ANS' || $award eq 'EXACT_ANS' ) {
738: $Apache::lonhomework::results{"resource.$id.tries"} =
739: $Apache::lonhomework::history{"resource.$id.tries"} + 1;
740: $Apache::lonhomework::results{"resource.$id.solved"} =
741: $solvemsg;
742: $Apache::lonhomework::results{"resource.$id.awarded"} = '1';
743: } elsif ( $award eq 'INCORRECT' ) {
744: $Apache::lonhomework::results{"resource.$id.tries"} =
745: $Apache::lonhomework::history{"resource.$id.tries"} + 1;
1.152 albertel 746: if (lc($Apache::lonhomework::problemstatus) eq 'no' ||
747: $Apache::lonhomework::scantronmode) {
1.135 albertel 748: $Apache::lonhomework::results{"resource.$id.awarded"} = 0;
749: }
750: $Apache::lonhomework::results{"resource.$id.solved"} =
751: 'incorrect_attempted';
752: } elsif ( $award eq 'SUBMITTED' ) {
753: $Apache::lonhomework::results{"resource.$id.tries"} =
754: $Apache::lonhomework::history{"resource.$id.tries"} + 1;
755: $Apache::lonhomework::results{"resource.$id.solved"} =
756: 'ungraded_attempted';
757: } elsif ( $award eq 'DRAFT' ) {
758: $Apache::lonhomework::results{"resource.$id.solved"} = '';
759: } elsif ( $award eq 'NO_RESPONSE' ) {
760: #no real response so delete any data that got stored
1.129 albertel 761: &removealldata($id);
762: return '';
763: } else {
1.135 albertel 764: $Apache::lonhomework::results{"resource.$id.solved"} =
765: 'incorrect_attempted';
1.152 albertel 766: if (lc($Apache::lonhomework::problemstatus) eq 'no' ||
767: $Apache::lonhomework::scantronmode) {
1.135 albertel 768: $Apache::lonhomework::results{"resource.$id.tries"} =
769: $Apache::lonhomework::history{"resource.$id.tries"} + 1;
770: $Apache::lonhomework::results{"resource.$id.awarded"} = 0;
771: }
772: }
1.136 albertel 773: if (defined($msg)) {
774: $Apache::lonhomework::results{"resource.$id.awardmsg"} = $msg;
775: }
1.135 albertel 776: # did either of the overall awards chage? If so ignore the
777: # previous check
778: if (($Apache::lonhomework::results{"resource.$id.awarded"} eq
779: $Apache::lonhomework::history{"resource.$id.awarded"}) &&
780: ($Apache::lonhomework::results{"resource.$id.solved"} eq
781: $Apache::lonhomework::history{"resource.$id.solved"})) {
782: # check if this was a previous submission if it was delete the
783: # unneeded data and update the previously_used attribute
784: if ( $previously_used eq 'PREVIOUSLY_USED') {
785: if (lc($Apache::lonhomework::problemstatus) ne 'no') {
786: delete($Apache::lonhomework::results{"resource.$id.tries"});
787: $Apache::lonhomework::results{"resource.$id.previous"} = '1';
788: }
789: } elsif ( $previously_used eq 'PREVIOUSLY_LAST') {
790: #delete all data as they student didn't do anything, but save
791: #the list of collaborators.
792: &removealldata($id);
793: #and since they didn't do anything we were never here
794: return '';
795: } else {
796: $Apache::lonhomework::results{"resource.$id.previous"} = '0';
797: }
1.101 albertel 798: }
1.135 albertel 799: } elsif ( $Apache::lonhomework::history{"resource.$id.solved"} =~
800: /^correct/ ) {
801: #delete all data as they student already has it correct
802: &removealldata($id);
803: #and since they didn't do anything we were never here
804: return '';
1.40 albertel 805: }
1.135 albertel 806: $Apache::lonhomework::results{"resource.$id.award"} = $award;
1.184 albertel 807: if ($award eq 'SUBMITTED') {
808: &Apache::response::add_to_gradingqueue();
809: }
1.10 albertel 810: }
811:
1.9 albertel 812: sub grade {
1.135 albertel 813: my ($target) = @_;
814: my $id = $Apache::inputtags::part;
815: my $response='';
1.165 albertel 816: if ( defined $env{'form.submitted'}) {
1.136 albertel 817: my (@awards,@msgs);
1.135 albertel 818: foreach $response (@Apache::inputtags::response) {
819: &Apache::lonxml::debug("looking for response.$id.$response.awarddetail");
820: my $value=$Apache::lonhomework::results{"resource.$id.$response.awarddetail"};
821: &Apache::lonxml::debug("keeping $value from $response for $id");
822: push (@awards,$value);
1.136 albertel 823: $value=$Apache::lonhomework::results{"resource.$id.$response.awardmsg"};
824: &Apache::lonxml::debug("got message $value from $response for $id");
825: push (@msgs,$value);
1.135 albertel 826: }
1.136 albertel 827: my ($finalaward,$msg) = &finalizeawards(\@awards,\@msgs);
1.135 albertel 828: my $previously_used;
829: if ( $#Apache::inputtags::previous eq $#awards ) {
830: my $match=0;
831: my @matches;
832: foreach my $versionar (@Apache::inputtags::previous_version) {
833: foreach my $version (@$versionar) {
834: $matches[$version]++;
835: }
836: }
837: foreach my $elem (@matches) {if ($elem eq ($#awards+1)) {$match=1;}}
838: if ($match) {
839: $previously_used = 'PREVIOUSLY_LAST';
840: foreach my $value (@Apache::inputtags::previous) {
841: if ($value eq 'PREVIOUSLY_USED' ) {
842: $previously_used = $value;
843: last;
844: }
1.75 albertel 845: }
846: }
1.43 albertel 847: }
1.136 albertel 848: &Apache::lonxml::debug("final award $finalaward, $previously_used, message $msg");
849: &setgradedata($finalaward,$msg,$id,$previously_used);
1.43 albertel 850: }
1.135 albertel 851: return '';
1.1 albertel 852: }
853:
1.11 albertel 854: sub gradestatus {
1.135 albertel 855: my ($id,$target) = @_;
856: my $showbutton = 1;
857: my $bgcolor = '';
858: my $message = '';
859: my $latemessage = '';
860: my $trystr='';
861: my $button='';
862: my $previousmsg='';
863:
864: my $status = $Apache::inputtags::status['-1'];
865: &Apache::lonxml::debug("gradestatus has :$status:");
1.183 albertel 866: if ( $status ne 'CLOSED'
867: && $status ne 'UNAVAILABLE'
868: && $status ne 'INVALID_ACCESS'
869: && $status ne 'NEEDS_CHECKIN'
870: && $status ne 'NOT_IN_A_SLOT') {
1.135 albertel 871: my $award = $Apache::lonhomework::history{"resource.$id.award"};
1.169 albertel 872: my $awarded = $Apache::lonhomework::history{"resource.$id.awarded"};
1.135 albertel 873: my $solved = $Apache::lonhomework::history{"resource.$id.solved"};
874: my $previous = $Apache::lonhomework::history{"resource.$id.previous"};
1.136 albertel 875: my $awardmsg = $Apache::lonhomework::history{"resource.$id.awardmsg"};
876: &Apache::lonxml::debug("Found Award |$award|$solved|$awardmsg");
1.144 albertel 877: if ( $award ne '' || $solved ne '' || $status eq 'SHOW_ANSWER') {
1.135 albertel 878: &Apache::lonxml::debug('Getting message');
879: ($showbutton,$bgcolor,$message,$previousmsg) =
1.169 albertel 880: &decideoutput($award,$awarded,$awardmsg,$solved,$previous,
881: $target);
1.135 albertel 882: if ($target eq 'tex') {
883: $message='\vskip 2 mm '.$message.' ';
884: } else {
885: $message="<td bgcolor=\"$bgcolor\">$message</td>";
886: if ($previousmsg) {
887: $previousmsg="<td bgcolor=\"#aaaaff\">$previousmsg</td>";
888: }
889: }
890: }
891: my $tries = $Apache::lonhomework::history{"resource.$id.tries"};
892: my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
893: &Apache::lonxml::debug("got maxtries of :$maxtries:");
894: #if tries are set to negative turn off the Tries/Button and messages
895: if (defined($maxtries) && $maxtries < 0) { return ''; }
896: if ( $tries eq '' ) { $tries = '0'; }
897: if ( $maxtries eq '' ) { $maxtries = '2'; }
898: if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; }
899: my $tries_text=&mt('Tries');
1.164 albertel 900: if ( $Apache::lonhomework::type eq 'survey' ||
901: $Apache::lonhomework::parsing_a_task) {
902: $tries_text=&mt('Submissions');
903: }
1.135 albertel 904: if ( $showbutton ) {
905: if ($target eq 'tex') {
1.165 albertel 906: if ($env{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $env{'form.suppress_tries'} ne 'yes') {
1.135 albertel 907: $trystr = ' {\vskip 1 mm \small \textit{'.$tries_text.'} '.$tries.'/'.$maxtries.'} \vskip 2 mm ';
908: } else {
909: $trystr = '\vskip 0 mm ';
910: }
911: } else {
1.136 albertel 912: $trystr = "<td><nobr>".$tries_text." $tries";
1.164 albertel 913: if ($Apache::lonhomework::parsing_a_task) {
1.165 albertel 914: } elsif($env{'request.state'} ne 'construct') {
1.135 albertel 915: $trystr.="/$maxtries";
916: } else {
917: if (defined($Apache::inputtags::params{'maxtries'})) {
918: $trystr.="/".$Apache::inputtags::params{'maxtries'};
919: }
920: }
1.136 albertel 921: $trystr.="</nobr></td>";
1.135 albertel 922: }
923: }
924: if ( $status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER') {$showbutton = 0;}
925: if ( $showbutton ) {
926: if ($target ne 'tex') {
1.156 albertel 927: $button = '<input type="submit" name="submit_'.$id.'" value="'.&mt('Submit Answer').'" />';
1.135 albertel 928: }
929: }
930: if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) {
931: #last submissions was after due date
1.163 albertel 932: $latemessage=&mt(' The last submission was after the Due Date ');;
933: if ($target eq 'web') {
934: $latemessage='<td bgcolor="#ffaaaa">'.$latemessage.'</td>';
1.135 albertel 935: }
936: }
937: }
938: my $output= $previousmsg.$latemessage.$message.$trystr;
939: if ($output =~ /^\s*$/) {
940: return $button;
1.63 sakharuk 941: } else {
1.135 albertel 942: if ($target eq 'tex') {
943: return $button.' \vskip 0 mm '.$output.' ';
944: } else {
945: return '<table><tr><td>'.$button.'</td>'.$output.'</tr></table>';
946: }
1.63 sakharuk 947: }
1.11 albertel 948: }
1.1 albertel 949: 1;
950: __END__
1.43 albertel 951:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>