--- loncom/homework/grades.pm 2007/06/11 21:36:18 1.401 +++ loncom/homework/grades.pm 2007/06/13 15:22:38 1.402 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.401 2007/06/11 21:36:18 albertel Exp $ +# $Id: grades.pm,v 1.402 2007/06/13 15:22:38 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6082,7 +6082,6 @@ GRADINGMENUJS # ''. # ' '.&mt('clicker file').' '."\n"; - $result.=''. ' scantron forms'."\n"; @@ -6156,6 +6155,28 @@ sub gather_clicker_ids { return %clickerids; } +sub gather_adv_clicker_ids { + my %clickerids=(); + my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'}; + my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'}; + my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum); + foreach my $element (sort keys %coursepersonnel) { + foreach my $person (split(/\,/,$coursepersonnel{$element})) { + my ($puname,$pudom)=split(/\:/,$person); + my $clickers = + (&Apache::lonnet::userenvironment($pudom,$puname,'clickers'))[1]; + foreach my $id (split(/\,/,$clickers)) { + if (exists($clickerids{$id})) { + $clickerids{$id}.=','.$puname.':'.$pudom; + } else { + $clickerids{$id}=$puname.':'.$pudom; + } + } + } + } + return %clickerids; +} + sub process_clicker { my ($r)=@_; my ($symb)=&get_symb($r); @@ -6171,10 +6192,54 @@ sub process_clicker { $result.=''."\n"; my $upload=&mt("Upload File"); my $type=&mt("Type"); + my $attendance=&mt("Award points just for participation"); + my $personnel=&mt("Correctness determined from response by course personnel"); + my $specific=&mt("Correctness determind from response with clicker ID"); + my $pcorrect=&mt("Percentage points for correct solution"); + my $pincorrect=&mt("Percentage points for incorrect solution"); my $selectform=&Apache::loncommon::select_form('iclicker','upfiletype', ('iclicker' => 'iClicker')); $result.=< +function sanitycheck() { +// Accept only integer percentages + document.forms.gradesupload.pcorrect.value=Math.round(document.forms.gradesupload.pcorrect.value); + document.forms.gradesupload.pincorrect.value=Math.round(document.forms.gradesupload.pincorrect.value); +// Find out grading choice + for (i=0; i
@@ -6182,6 +6247,13 @@ sub process_clicker {
+
+
+
+ + +
+

ENDUPFORM