version 1.489, 2012/10/12 13:48:50
|
version 1.493, 2012/12/30 16:05:15
|
Line 164 If true, the resource's folder will not
|
Line 164 If true, the resource's folder will not
|
it. Default is false. True implies printCloseAll is false, since you |
it. Default is false. True implies printCloseAll is false, since you |
can't close or open folders when this is on anyhow. |
can't close or open folders when this is on anyhow. |
|
|
|
=item * B<map_no_edit_link>: |
|
|
|
If true, the title of the folder or page will not be followed by an |
|
icon/link to direct editing of a folder or composite page, originally |
|
added via the Course Editor. |
|
|
=back |
=back |
|
|
=item * B<Apache::lonnavmaps::communication_status>: |
=item * B<Apache::lonnavmaps::communication_status>: |
Line 981 sub render_resource {
|
Line 987 sub render_resource {
|
} |
} |
if ((&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) && |
if ((&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) && |
($resource->symb=~/\_\_\_[^\_]+\_\_\_uploaded/)) { |
($resource->symb=~/\_\_\_[^\_]+\_\_\_uploaded/)) { |
my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png'; |
if (!$params->{'map_no_edit_link'}) { |
$editmapLink=' '. |
my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png'; |
'<a href="/adm/coursedocs?command=direct&symb='.&escape($resource->symb()).'">'. |
$editmapLink=' '. |
|
'<a href="/adm/coursedocs?command=directnav&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 1040 sub render_resource {
|
Line 1048 sub render_resource {
|
} |
} |
|
|
if (!$params->{'resource_nolink'} && !$resource->is_sequence() && !$resource->is_empty_sequence) { |
if (!$params->{'resource_nolink'} && !$resource->is_sequence() && !$resource->is_empty_sequence) { |
$result .= "$curMarkerBegin<a href=\"$link\">$title$partLabel</a>$curMarkerEnd$nonLinkedText</td>"; |
$result .= "$curMarkerBegin<a href=\"$link\">$title$partLabel</a>$curMarkerEnd$editmapLink$nonLinkedText</td>"; |
} else { |
} else { |
$result .= "$curMarkerBegin$linkopen$title$partLabel</a>$curMarkerEnd$editmapLink$nonLinkedText</td>"; |
$result .= "$curMarkerBegin$linkopen$title$partLabel</a>$curMarkerEnd$editmapLink$nonLinkedText</td>"; |
} |
} |
Line 2011 sub new {
|
Line 2019 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; |
|
|
|
|
|
|
Line 2027 sub new {
|
Line 2036 sub new {
|
# assume there are course hashes for the specific requested user@domamin: |
# assume there are course hashes for the specific requested user@domamin: |
# |
# |
|
|
if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'})) { |
if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) && !$self->{CODE}) { |
|
|
# tie the nav hash |
# tie the nav hash |
|
|
Line 2050 sub new {
|
Line 2059 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->change_user($self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}); |
} |
} |
|
|
return $self; |
return $self; |
Line 2063 sub new {
|
Line 2072 sub new {
|
# Parameters: |
# Parameters: |
# user - New user. |
# user - New user. |
# domain- Domain the user belongs to. |
# domain- Domain the user belongs to. |
|
# code - Anonymous CODE in use. |
# Implicit inputs: |
# Implicit inputs: |
# |
# |
sub change_user { |
sub change_user { |
my $self = shift; |
my $self = shift; |
$self->{USERNAME} = shift; |
$self->{USERNAME} = shift; |
$self->{DOMAIN} = shift; |
$self->{DOMAIN} = shift; |
|
$self->{CODE} = 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 2084 sub change_user {
|
Line 2095 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}, \%big_hash); |
&Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, \%big_hash); |
$self->{NAV_HASH} = \%big_hash; |
$self->{NAV_HASH} = \%big_hash; |
|
|
|
|