--- rat/lonratedt.pm 2010/03/10 21:26:15 1.99 +++ rat/lonratedt.pm 2011/11/14 00:20:46 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.99 2010/03/10 21:26:15 droeschl Exp $ +# $Id: lonratedt.pm,v 1.104 2011/11/14 00:20:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,10 +151,10 @@ function idxopen(mode) { } // ------------------------------------------------------ Open groupsort window -function groupopen(url,recover,bookmarks) { +function groupopen(url,recover) { var options="scrollbars=1,resizable=1,menubar=0"; idxflag=1; - idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options); + idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url,"idxout",options); idx.focus(); } @@ -491,7 +491,7 @@ sub smpedt { 'nt' => 'New Title', 'se' => 'Search', 'im' => 'Import', - 'bk' => 'Import Bookmarks', + 'wl' => 'Import from Wishlist', 'vi' => 'View', 'lm' => 'Load Map', 'ds' => 'Discard Selected', @@ -549,7 +549,7 @@ ENDJS &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({ text => 'Construction Space', - href => &Apache::loncommon::authorspace(), + href => &Apache::loncommon::authorspace($url), faq => 6, bug => 'RAT', help => 'Sequence_Simple_Editor_Creation',}); @@ -601,9 +601,9 @@ value="Select Map" /> +"javascript:impfortarget.value=1;open_Wishlist_Import('simple');" value="$lt{'wl'}" /> +"javascript:impfortarget.value=1;groupopen('$url',1);" value="$lt{'reco'}" /> $lt{'as'}
@@ -645,8 +645,10 @@ ENDSMPHEAD # ----------------------------------------------------------------- No such dir sub nodir { my ($r,$dir)=@_; - $dir=~s{^/home/$LONCAPA::username_re/public_html}{}; - my $brcrum = [{'href' => &Apache::loncommon::authorspace(), + my $londocroot = $r->dir_config('lonDocRoot'); + my ($path) = ($dir =~ m{^\Q$londocroot\E?(/priv/[^/]+/[^/]+/)}); + $dir=~s{^\Q$londocroot/priv/\E[^/]+/[^/]+}{}; + my $brcrum = [{'href' => &Apache::loncommon::authorspace($path), 'text' => 'Construction Space'}]; # {'href' => '', # 'text' => 'No such directory'}]; @@ -670,7 +672,7 @@ sub viewmap { &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({ text => 'Construction Space', - href => &Apache::loncommon::authorspace(), + href => &Apache::loncommon::authorspace($url), faq => 6, bug => 'RAT', help => 'Sequence_Simple_Editor_Creation',});