[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm /lonnet/perl lonnet.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 07 Sep 2002 17:53:06 -0000
www Sat Sep 7 13:53:06 2002 EDT
Modified files:
/loncom/interface lonparmset.pm
/loncom/lonnet/perl lonnet.pm
Log:
Bug 702 - lonparmset resets cache for course to get rid of confusing
session value column.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.66 loncom/interface/lonparmset.pm:1.67
--- loncom/interface/lonparmset.pm:1.66 Sat Sep 7 13:30:31 2002
+++ loncom/interface/lonparmset.pm Sat Sep 7 13:53:05 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.66 2002/09/07 17:30:31 www Exp $
+# $Id: lonparmset.pm,v 1.67 2002/09/07 17:53:05 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -804,6 +804,10 @@
if ($reply=~/^error\:(.*)/) {
$message.="<font color=red>Write Error: $1</font>";
}
+# --------------------------------------------- Devalidate cache for this child
+ &Apache::lonnet::devalidatecourseresdata(
+ $ENV{'course.'.$ENV{'request.course.id'}.'.num'},
+ $ENV{'course.'.$ENV{'request.course.id'}.'.domain'});
# ---------------------------------------------------------------- Done storing
}
# -------------------------------------------------------------- Get coursedata
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.278 loncom/lonnet/perl/lonnet.pm:1.279
--- loncom/lonnet/perl/lonnet.pm:1.278 Thu Sep 5 15:37:00 2002
+++ loncom/lonnet/perl/lonnet.pm Sat Sep 7 13:53:05 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.278 2002/09/05 19:37:00 www Exp $
+# $Id: lonnet.pm,v 1.279 2002/09/07 17:53:05 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2533,6 +2533,14 @@
}
}
return $result;
+}
+
+# ---------------------------------------------------- Devalidate courseresdata
+
+sub devalidatecourseresdata {
+ my ($coursenum,$coursedomain)=@_;
+ my $hashid=$coursenum.':'.$coursedomain;
+ delete $courseresdatacache{$hashid.'.time'};
}
# --------------------------------------------------- Course Resourcedata Query