--- loncom/interface/loncoursedata.pm 2008/11/20 21:22:21 1.190 +++ loncom/interface/loncoursedata.pm 2011/06/28 09:38:05 1.191 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.190 2008/11/20 21:22:21 jms Exp $ +# $Id: loncoursedata.pm,v 1.191 2011/06/28 09:38:05 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,6 +56,17 @@ use Apache::lonmysql(); use LONCAPA; use Digest::MD5(); +=pod + +=head 2 make_into_hash + +Turn a colon separated string into a hash and return a reference +to it. Numbering from 0 even elements are keys and odd elements +are values e.g. a:b:c:d creates a hash like + a => b, c =>d + +=cut + sub make_into_hash { my $values = shift; my %tmp = map { &unescape($_); } split(':',$values); @@ -436,8 +447,17 @@ sub init_dbs { return 0; } +=pod + +=head2 delete_caches +Drops all of the tables in the local mysql cache associated with the +specified course id. +TODO: The drops shoulid be pushed into lonmysql to further isolate +mysql code from other modules. + +=cut sub delete_caches { my $courseid = shift; $courseid = $env{'request.course.id'} if (! defined($courseid));