[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm
From: albertel <lon-capa-cvs-allow () mail ! lon-capa ! org>
Date: 2007-09-25 23:45:35
Message-ID: cvsalbertel1190763935 () cvsserver
[Download RAW message or body]
albertel Tue Sep 25 19:45:35 2007 EDT
Modified files:
/loncom/homework imageresponse.pm
Log:
- storing the submission data like how option/match etc do it..
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.85 loncom/homework/imageresponse.pm:1.86
--- loncom/homework/imageresponse.pm:1.85 Tue Sep 25 19:16:13 2007
+++ loncom/homework/imageresponse.pm Tue Sep 25 19:45:33 2007
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.85 2007/09/25 23:16:13 albertel Exp $
+# $Id: imageresponse.pm,v 1.86 2007/09/25 23:45:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -376,8 +376,8 @@
sub stringify_submission {
my ($response) = @_;
- return
- join("\0",map {$_."\1".$response->{$_}} (sort(keys(%{ $response }))));
+ return &Apache::lonnet::hash2str(%{ $response });
+
}
@@ -391,10 +391,10 @@
$Apache::lonhomework::history{"resource.$part.$respid.submission"};
}
- if ($string !~ /\0/) {
+ if ($string !~ /=/) {
return split(':',$string);
} else {
- my %response = map { split("\1",$_,2) } (split("\0",$string));
+ my %response = &Apache::lonnet::str2hash($string);
return split(':',$response{$name});
}
}
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic