--- rat/lonratedt.pm 2006/04/13 19:00:57 1.76
+++ rat/lonratedt.pm 2006/06/19 09:42:56 1.80
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Edit Handler for RAT Maps
#
-# $Id: lonratedt.pm,v 1.76 2006/04/13 19:00:57 albertel Exp $
+# $Id: lonratedt.pm,v 1.80 2006/06/19 09:42:56 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -172,6 +172,9 @@ use Apache::lonsequence;
use Apache::loncommon;
use Apache::lonlocal;
use File::Copy;
+use lib '/home/httpd/lib/perl/';
+use LONCAPA;
+
use vars qw(@order @resources @resparms @zombies);
@@ -488,8 +491,8 @@ sub pastetarget {
foreach (@which) {
if (defined($_)) {
my ($name,$url)=split(/\=/,$_);
- $name=&Apache::lonnet::unescape($name);
- $url=&Apache::lonnet::unescape($url);
+ $name=&unescape($name);
+ $url=&unescape($url);
if ($url) {
my $idx=&getresidx($url);
$insertorder[$#insertorder+1]=$idx;
@@ -696,10 +699,10 @@ function idxopen(mode) {
}
// ------------------------------------------------------ Open groupsort window
-function groupopen(url,recover) {
+function groupopen(url,recover,bookmarks) {
var options="scrollbars=1,resizable=1,menubar=0";
idxflag=1;
- idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url,"idxout",options);
+ idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);
idx.focus();
}
@@ -713,11 +716,11 @@ function srchopen(mode) {
}
// ----------------------------------------------------- launch indexer browser
function groupsearch() {
- srchcheck('groupsearch');
+ srchcheck('import');
}
function groupimport() {
- idxcheck('groupimport');
+ idxcheck('import');
}
// ------------------------------------------------------- Do srch status check
@@ -871,8 +874,8 @@ sub smpedt {
&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$env{'form.importmap'}))) {
my ($name,$url)=split(/\:/,$_);
if ($url) {
- $importdetail.='&'.&Apache::lonnet::escape($name).'='.
- &Apache::lonnet::escape($url);
+ $importdetail.='&'.&escape($name).'='.
+ &escape($url);
}
}
@@ -918,8 +921,8 @@ sub smpedt {
foreach (@targetselect) {
my ($name,$url)=split(/\:/,$resources[$order[$_-1]]);
if ($url) {
- $importdetail.='&'.&Apache::lonnet::escape($name).'='.
- &Apache::lonnet::escape($url);
+ $importdetail.='&'.&escape($name).'='.
+ &escape($url);
}
}
@@ -1006,7 +1009,7 @@ sub smpedt {
my ($name,$url)=split(/\=/,$_);
unless ($name) { $name=(split(/\//,$url))[-1]; }
unless ($name) { $name='EMPTY'; }
- '';
}
} split(/\&/,$importdetail));
@@ -1019,8 +1022,8 @@ sub smpedt {
my ($name,$url)=split(/\:/,$resources[$_]);
unless ($name) { $name=(split(/\//,$url))[-1]; }
unless ($name) { $name='EMPTY'; }
- $targetdetail.='&'.&Apache::lonnet::escape($name).'='.
- &Apache::lonnet::escape($url);
+ $targetdetail.='&'.&escape($name).'='.
+ &escape($url);
$idx++;
$name=~s/\:/\:/g;
'';
@@ -1034,6 +1037,7 @@ sub smpedt {
'nt' => 'New Title',
'se' => 'Search',
'im' => 'Import',
+ 'bk' => 'Import Bookmarks',
'vi' => 'View',
'lm' => 'Load Map',
'ds' => 'Discard Selected',
@@ -1051,7 +1055,7 @@ sub smpedt {
'reco' => 'Recover Deleted'
);
my $js=<
$editscript
@@ -1136,7 +1140,9 @@ value="Select Map">
+"javascript:impfortarget.value=1;groupopen(0,1,1);" value="$lt{'bk'}">
+
$lt{'as'}