Diff for /loncom/interface/lonnavmaps.pm between versions 1.493 and 1.499

version 1.493, 2012/12/30 16:05:15 version 1.499, 2014/01/19 21:17:04
Line 494  use HTML::Entities; Line 494  use HTML::Entities;
   
 # For debugging  # For debugging
   
 use Data::Dumper;  #use Data::Dumper;
   
   
 # symbolic constants  # symbolic constants
Line 619  sub getDescription { Line 619  sub getDescription {
         return &mt("Having technical difficulties; please check status later");           return &mt("Having technical difficulties; please check status later"); 
     }      }
     if ($status == $res->NOTHING_SET) {      if ($status == $res->NOTHING_SET) {
         return &Apache::lonhtmlcommon::direct_parm_link(&mt("Not currently assigned.",$res->symb(),'opendate'),$part);          return &Apache::lonhtmlcommon::direct_parm_link(&mt('Not currently assigned'),$res->symb(),'opendate',$part);
     }      }
     if ($status == $res->OPEN_LATER) {      if ($status == $res->OPEN_LATER) {
         return &mt("Open [_1]",&Apache::lonhtmlcommon::direct_parm_link(&timeToHumanString($open,'start'),$res->symb(),'opendate',$part));          return &mt("Open [_1]",&Apache::lonhtmlcommon::direct_parm_link(&timeToHumanString($open,'start'),$res->symb(),'opendate',$part));
Line 990  sub render_resource { Line 990  sub render_resource {
             if (!$params->{'map_no_edit_link'}) {              if (!$params->{'map_no_edit_link'}) {
                 my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';                  my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';
                 $editmapLink=' '.                  $editmapLink=' '.
                          '<a href="/adm/coursedocs?command=directnav&symb='.&escape($resource->symb()).'">'.                           '<a href="/adm/coursedocs?command=directnav&amp;symb='.&escape($resource->symb()).'">'.
                          '<img src="'.$icon.'" alt="'.&mt('Edit Content').'" title="'.&mt('Edit Content').'" />'.                           '<img src="'.$icon.'" alt="'.&mt('Edit Content').'" title="'.&mt('Edit Content').'" />'.
                          '</a>';                           '</a>';
             }              }
Line 2020  sub new { Line 2020  sub new {
     $self->{USERNAME} = shift || $env{'user.name'};      $self->{USERNAME} = shift || $env{'user.name'};
     $self->{DOMAIN}   = shift || $env{'user.domain'};      $self->{DOMAIN}   = shift || $env{'user.domain'};
     $self->{CODE}     = shift;      $self->{CODE}     = shift;
       $self->{NOHIDE} = shift;
   
   
   
Line 2059  sub new { Line 2060  sub new {
  $self->{PARM_HASH} = \%parmhash;   $self->{PARM_HASH} = \%parmhash;
  $self->{PARM_CACHE} = {};   $self->{PARM_CACHE} = {};
     } else {      } else {
  $self->change_user($self->{USERNAME}, $self->{DOMAIN},  $self->{CODE});   $self->change_user($self->{USERNAME}, $self->{DOMAIN},  $self->{CODE}, $self->{NOHIDE});
     }      }
   
     return $self;      return $self;
Line 2080  sub change_user { Line 2081  sub change_user {
     $self->{USERNAME} = shift;      $self->{USERNAME} = shift;
     $self->{DOMAIN}   = shift;      $self->{DOMAIN}   = shift;
     $self->{CODE}     = shift;      $self->{CODE}     = shift;
       $self->{NOHIDE}   = shift;
   
     # If the hashes are already tied make sure to break that bond:      # If the hashes are already tied make sure to break that bond:
   
Line 2095  sub change_user { Line 2097  sub change_user {
     my ($cdom, $cnum) = split(/\_/, $env{'request.course.id'});      my ($cdom, $cnum) = split(/\_/, $env{'request.course.id'});
   
     my %big_hash;      my %big_hash;
     &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, \%big_hash);      &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, $self->{NOHIDE}, \%big_hash);
     $self->{NAV_HASH} = \%big_hash;      $self->{NAV_HASH} = \%big_hash;
   
   
Line 4233  resource of the map. Line 4235  resource of the map.
   
 Returns a string with the type of the map in it.  Returns a string with the type of the map in it.
   
 =item *B<map_hierarchy>:  =item * B<map_hierarchy>:
   
 Returns a string with a comma-separated ordered list of map_pc IDs  Returns a string with a comma-separated ordered list of map_pc IDs
 for the hierarchy of maps containing a map, with the top level  for the hierarchy of maps containing a map, with the top level
Line 4376  sub printable { Line 4378  sub printable {
   
     my ($self, $part) = @_;      my ($self, $part) = @_;
   
     &Apache::lonnet::logthis($self->symb());  
   
   
     #  The following cases apply:      #  The following cases apply:
     #  - If a start date is not set, it is replaced by the open date.      #  - If a start date is not set, it is replaced by the open date.
     #  - Ditto for start/open replaced by content open.      #  - Ditto for start/open replaced by content open.

Removed from v.1.493  
changed lines
  Added in v.1.499


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>