--- loncom/homework/grades.pm 2007/06/16 14:09:52 1.412 +++ loncom/homework/grades.pm 2007/06/22 23:45:19 1.418 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.412 2007/06/16 14:09:52 www Exp $ +# $Id: grades.pm,v 1.418 2007/06/22 23:45:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -93,6 +93,7 @@ sub get_symb { return (); } } + &Apache::lonenc::check_decrypt(\$symb); return ($symb); } @@ -492,7 +493,7 @@ sub jscriptNform { ' }'."\n". ''."\n"; $jscript.= '
'."\n"; + 'onClick="javascript:submit();" target="_self" />'."\n"; if (scalar(%$fullname) eq 0) { my $colspan=3+scalar(@parts); $result='There are no students in section "'.$env{'form.section'}. @@ -3107,7 +3093,7 @@ sub viewstudentgrade { ''. "\n".$ctr.'
@@ -6343,12 +6364,20 @@ ENDHEADER
&mt('Awarding [_1] percent for correct and [_2] percent for incorrect responses',
$env{'form.pcorrect'},$env{'form.pincorrect'}).
' '; +# Remember Question Titles +# FIXME: Possibly need delimiter other than ":" + for (my $i=0;$i<$number;$i++) { + $result.='').'" />'; + } my $correct_count=0; my $student_count=0; my $unknown_count=0; +# Match answers with usernames +# FIXME: Possibly need delimiter other than ":" foreach my $id (keys(%responses)) { if ($correct_ids{$id}) { - $result.="\n".''; + $result.="\n".''; $correct_count++; } elsif ($clicker_ids{$id}) { $result.="\n".''; @@ -6369,7 +6398,7 @@ ENDHEADER if ($correct_count==0) { $errormsg.="Found no correct answers answers for grading!"; } elsif ($correct_count>1) { - $result.=' '.&mt("Found [_1] entries for grading!").''; + $result.=' '.&mt("Found [_1] entries for grading!",$correct_count).''; } } if ($errormsg) { @@ -6409,6 +6438,99 @@ sub iclicker_eval { return ($errormsg,$number); } +sub assign_clicker_grades { + my ($r)=@_; + my ($symb)=&get_symb($r); + if (!$symb) {return '';} +# See which part we are saving to + my ($partlist,$handgrade,$responseType) = &response_type($symb); +# FIXME: This should probably look for the first handgradeable part + my $part=$$partlist[0]; +# Start screen output + my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); + + my $heading=&mt('Assigning grades based on clicker file'); + $result.=(<
'."\n"; + return $result.&show_grading_menu_form($symb); +} + sub handler { my $request=$_[0]; @@ -6480,6 +6602,8 @@ sub handler { $request->print(&process_clicker($request)); } elsif ($command eq 'processclickerfile' && $perm{'mgr'}) { $request->print(&process_clicker_file($request)); + } elsif ($command eq 'assignclickergrades' && $perm{'mgr'}) { + $request->print(&assign_clicker_grades($request)); } elsif ($command eq 'csvform' && $perm{'mgr'}) { $request->print(&upcsvScores_form($request)); } elsif ($command eq 'csvupload' && $perm{'mgr'}) { |