version 1.190, 2008/11/20 21:22:21
|
version 1.191, 2011/06/28 09:38:05
|
Line 56 use Apache::lonmysql();
|
Line 56 use Apache::lonmysql();
|
use LONCAPA; |
use LONCAPA; |
use Digest::MD5(); |
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 { |
sub make_into_hash { |
my $values = shift; |
my $values = shift; |
my %tmp = map { &unescape($_); } split(':',$values); |
my %tmp = map { &unescape($_); } split(':',$values); |
Line 436 sub init_dbs {
|
Line 447 sub init_dbs {
|
return 0; |
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 { |
sub delete_caches { |
my $courseid = shift; |
my $courseid = shift; |
$courseid = $env{'request.course.id'} if (! defined($courseid)); |
$courseid = $env{'request.course.id'} if (! defined($courseid)); |