[LON-CAPA-cvs] cvs: loncom /homework response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 23 Sep 2005 16:47:07 -0000
albertel Fri Sep 23 12:47:07 2005 EDT
Modified files:
/loncom/homework response.pm
Log:
- document the essayresponse upload scoring
- fix BUG#4385 (printing extra lines for scoring)
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.124 loncom/homework/response.pm:1.125
--- loncom/homework/response.pm:1.124 Wed Aug 17 12:52:37 2005
+++ loncom/homework/response.pm Fri Sep 23 12:47:06 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.124 2005/08/17 16:52:37 albertel Exp $
+# $Id: response.pm,v 1.125 2005/09/23 16:47:06 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -582,8 +582,8 @@
my $id = $Apache::inputtags::part;
my $weight = &Apache::lonnet::EXT("resource.$id.weight");
if (!defined($weight) || ($weight eq '')) { $weight=1; }
- my $repetition = int $weight/9;
- if ($weight % 9 != 0) {$repetition++;}
+ my $repetition = int($weight/10);
+ if ($weight % 10 != 0) { $repetition++; }
return $repetition;
}
@@ -592,6 +592,7 @@
my $repetition=&repetition();
my $score=0;
for (my $i=0;$i<$repetition;$i++) {
+ # A is 1, B is 2, etc. (get response return 0-9 and then we add 1)
my $increase=&Apache::response::getresponse($i+1);
if ($increase ne '') { $score+=$increase+1; }
}