[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Thu May 23 10:36:45 EDT 2013


raeburn		Thu May 23 14:36:45 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - For 2.11
    - Backport 1.1223
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.24 loncom/lonnet/perl/lonnet.pm:1.1172.2.25
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.24	Wed May 15 19:49:25 2013
+++ loncom/lonnet/perl/lonnet.pm	Thu May 23 14:36:44 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1172.2.24 2013/05/15 19:49:25 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.25 2013/05/23 14:36:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10357,78 +10357,6 @@
     return $title;
 }
 
-sub getdocspath {
-    my ($symb) = @_;
-    my $path;
-    if ($symb) {
-        my ($mapurl,$id,$resurl) = &decode_symb($symb);
-        if ($resurl=~/\.(sequence|page)$/) {
-            $mapurl=$resurl;
-        } elsif ($resurl eq 'adm/navmaps') {
-            $mapurl=$env{'course.'.$env{'request.course.id'}.'.url'};
-        }
-        my $mapresobj;
-        my $navmap = Apache::lonnavmaps::navmap->new();
-        if (ref($navmap)) {
-            $mapresobj = $navmap->getResourceByUrl($mapurl);
-        }
-        $mapurl=~s{^.*/([^/]+)\.(\w+)$}{$1};
-        my $type=$2;
-        if (ref($mapresobj)) {
-            my $pcslist = $mapresobj->map_hierarchy();
-            if ($pcslist ne '') {
-                foreach my $pc (split(/,/,$pcslist)) {
-                    next if ($pc <= 1);
-                    my $res = $navmap->getByMapPc($pc);
-                    if (ref($res)) {
-                        my $thisurl = $res->src();
-                        $thisurl=~s{^.*/([^/]+)\.\w+$}{$1};
-                        my $thistitle = $res->title();
-                        $path .= '&'.
-                                 &Apache::lonhtmlcommon::entity_encode($thisurl).'&'.
-                                 &Apache::lonhtmlcommon::entity_encode($thistitle).
-                                 ':'.$res->randompick().
-                                 ':'.$res->randomout().
-                                 ':'.$res->encrypted().
-                                 ':'.$res->randomorder().
-                                 ':'.$res->is_page();
-                    }
-                }
-            }
-            $path =~ s/^\&//;
-            my $maptitle = $mapresobj->title();
-            if ($mapurl eq 'default') {
-                $maptitle = 'Main Course Documents';
-            }
-            $path .= ($path ne '')? '&' : ''.
-                    &Apache::lonhtmlcommon::entity_encode($mapurl).'&'.
-                    &Apache::lonhtmlcommon::entity_encode($maptitle).
-                    ':'.$mapresobj->randompick().
-                    ':'.$mapresobj->randomout().
-                    ':'.$mapresobj->encrypted().
-                    ':'.$mapresobj->randomorder().
-                    ':'.$mapresobj->is_page();
-        } else {
-            my $maptitle = &gettitle($mapurl);
-            my $ispage;
-            if ($mapurl =~ /\.page$/) {
-                $ispage = 1;
-            }
-            if ($mapurl eq 'default') {
-                $maptitle = 'Main Course Documents';
-            }
-            $path = &Apache::lonhtmlcommon::entity_encode($mapurl).'&'.
-                    &Apache::lonhtmlcommon::entity_encode($maptitle).':::::'.$ispage;
-        }
-        unless ($mapurl eq 'default') {
-            $path = 'default&'.
-                    &Apache::lonhtmlcommon::entity_encode('Main Course Documents').
-                    ':::::&'.$path;
-        }
-    }
-    return $path;
-}
-
 sub get_slot {
     my ($which,$cnum,$cdom)=@_;
     if (!$cnum || !$cdom) {




More information about the LON-CAPA-cvs mailing list