[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 21 Dec 2005 19:10:35 -0000
albertel Wed Dec 21 14:10:35 2005 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- was cleaning out the version nu,mber accidently so reorg the versionsing and comment
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.92 loncom/homework/bridgetask.pm:1.93
--- loncom/homework/bridgetask.pm:1.92 Wed Dec 21 14:07:53 2005
+++ loncom/homework/bridgetask.pm Wed Dec 21 14:10:33 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.92 2005/12/21 19:07:53 albertel Exp $
+# $Id: bridgetask.pm,v 1.93 2005/12/21 19:10:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -80,19 +80,25 @@
}
}
if ($authenticated && $type eq 'Task') {
+ # increment version
my $version=
$Apache::lonhomework::history{'resource.0.version'};
$version++;
- $Apache::lonhomework::results{'resource.0.version'}=$version;
- $Apache::lonhomework::results{"resource.$version.0.checkedin"}=
- $user.'@'.$domain;
- $Apache::lonhomework::results{"resource.$version.0.checkedin.slot"}=
- $slot_name;
+
+ #clean out all current results
foreach my $key (keys(%Apache::lonhomework::history)) {
if ($key=~/^resource\.0\./) {
$Apache::lonhomework::results{$key}='';
}
}
+
+ #setup new version and who did it
+ $Apache::lonhomework::results{'resource.0.version'}=$version;
+ $Apache::lonhomework::results{"resource.$version.0.checkedin"}=
+ $user.'@'.$domain;
+ $Apache::lonhomework::results{"resource.$version.0.checkedin.slot"}=
+ $slot_name;
+
return 1;
} elsif ($authenticated && $type eq 'problem') {
&Apache::lonxml::debug("authed $slot_name");