version 1.151, 2025/03/31 13:55:06
|
version 1.152, 2025/04/02 23:44:01
|
Line 83 sub start_page {
|
Line 83 sub start_page {
|
($env{'form.command'} eq 'remove_registration')))) { |
($env{'form.command'} eq 'remove_registration')))) { |
if ($env{'form.symb'}) { |
if ($env{'form.symb'}) { |
my $symb=&unescape($env{'form.symb'}); |
my $symb=&unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($symb); |
my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($symb); |
if ($resurl =~ /ext\.tool$/) { |
if ($resurl =~ /ext\.tool$/) { |
my $target; |
my $target; |
Line 714 sub remove_registration_user {
|
Line 717 sub remove_registration_user {
|
my $name = &Apache::loncommon::plainname($env{'form.uname'}, |
my $name = &Apache::loncommon::plainname($env{'form.uname'}, |
$env{'form.udom'}); |
$env{'form.udom'}); |
|
|
my $title = &Apache::lonnet::gettitle($env{'form.symb'}); |
my $symb = &unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
|
my $title = &Apache::lonnet::gettitle($symb); |
|
|
my $msg = &mt('Remove [_1] from slot [_2] for [_3]', |
my $msg = &mt('Remove [_1] from slot [_2] for [_3]', |
$name,$slot_name,$title); |
$name,$slot_name,$title); |
Line 796 sub release_slot {
|
Line 803 sub release_slot {
|
if ($mgr eq 'F' |
if ($mgr eq 'F' |
&& defined($env{'form.symb'})) { |
&& defined($env{'form.symb'})) { |
$symb = &unescape($env{'form.symb'}); |
$symb = &unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
} |
} |
|
|
my ($result,$msg) = |
my ($result,$msg) = |
Line 1548 ENDSCRIPT
|
Line 1558 ENDSCRIPT
|
'<th>'.&mt('Action').'</th><th>'.&mt('Name').'</th>'. |
'<th>'.&mt('Action').'</th><th>'.&mt('Name').'</th>'. |
&Apache::loncommon::end_data_table_header_row(); |
&Apache::loncommon::end_data_table_header_row(); |
} |
} |
|
my $shownsymb; |
|
if ($env{'request.role.adv'}) { |
|
$shownsymb = $symb; |
|
} elsif (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i) { |
|
$shownsymb = &Apache::lonenc::encrypted($symb); |
|
} else { |
|
$shownsymb = $symb; |
|
} |
|
$shownsymb = &escape($shownsymb); |
foreach my $slot (@{$available}) { |
foreach my $slot (@{$available}) { |
my $description=&get_description($slot,$slots->{$slot}); |
my $description=&get_description($slot,$slots->{$slot}); |
my $form; |
my $form; |
Line 1572 ENDSCRIPT
|
Line 1591 ENDSCRIPT
|
} |
} |
} |
} |
} |
} |
my $escsymb=&escape($symb); |
|
if (!$form) { |
if (!$form) { |
my $name; |
my $name; |
if ($formname) { |
if ($formname) { |
Line 1585 ENDSCRIPT
|
Line 1603 ENDSCRIPT
|
$form=<<STUFF; |
$form=<<STUFF; |
<form method="post" action="/adm/slotrequest" $name> |
<form method="post" action="/adm/slotrequest" $name> |
<input type="submit" name="Select" value="$text" /> |
<input type="submit" name="Select" value="$text" /> |
<input type="hidden" name="symb" value="$escsymb" /> |
<input type="hidden" name="symb" value="$shownsymb" /> |
<input type="hidden" name="slotname" value="$slot" /> |
<input type="hidden" name="slotname" value="$slot" /> |
<input type="hidden" name="command" value="$command" /> |
<input type="hidden" name="command" value="$command" /> |
<input type="hidden" name="context" value="$context" /> |
<input type="hidden" name="context" value="$context" /> |
Line 1698 sub remove_link {
|
Line 1716 sub remove_link {
|
undef($udom); |
undef($udom); |
} |
} |
|
|
|
my $shownsymb; |
|
if ($env{'request.role.adv'}) { |
|
$shownsymb = $symb; |
|
} elsif (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i) { |
|
$shownsymb = &Apache::lonenc::encrypted($symb); |
|
} else { |
|
$shownsymb = $symb; |
|
} |
|
|
$slotname = &escape($slotname); |
$slotname = &escape($slotname); |
$entry = &escape($entry); |
$entry = &escape($entry); |
$uname = &escape($uname); |
$uname = &escape($uname); |
$udom = &escape($udom); |
$udom = &escape($udom); |
$symb = &escape($symb); |
$symb = &escape($shownsymb); |
|
|
return <<"END_LINK"; |
return <<"END_LINK"; |
<a href="/adm/slotrequest?command=remove_registration&slotname=$slotname&entry=$entry&uname=$uname&udom=$udom&symb=$symb&context=manage" |
<a href="/adm/slotrequest?command=remove_registration&slotname=$slotname&entry=$entry&uname=$uname&udom=$udom&symb=$symb&context=manage" |
Line 2378 sub manage_reservations {
|
Line 2405 sub manage_reservations {
|
$currcontainer = $parent{$depth}; |
$currcontainer = $parent{$depth}; |
} elsif (ref($resource)) { |
} elsif (ref($resource)) { |
my $symb = $resource->symb(); |
my $symb = $resource->symb(); |
|
my $src = $resource->src(); |
|
my ($shownsymb,$shownsrc); |
|
$shownsymb = $resource->shown_symb(); |
|
if ($resource->encrypted()) { |
|
$shownsrc = &Apache::lonenc::encrypted($src); |
|
} else { |
|
$shownsrc = $src; |
|
} |
next if (!$resource->is_problem() && !$resource->is_tool() && |
next if (!$resource->is_problem() && !$resource->is_tool() && |
!$resource->is_sequence() && !$resource->is_page()); |
!$resource->is_sequence() && !$resource->is_page()); |
$count ++; |
$count ++; |
Line 2409 sub manage_reservations {
|
Line 2444 sub manage_reservations {
|
for (my $i=0; $i<$depth; $i++) { |
for (my $i=0; $i<$depth; $i++) { |
$r->print('<img src="'.$location.'" alt="" />'); |
$r->print('<img src="'.$location.'" alt="" />'); |
} |
} |
$r->print('<a href="'.$resource->src().'?symb='.$symb.'">'. |
$r->print('<a href="'.$shownsrc.'?symb='.$shownsymb.'">'. |
'<img class="LC_contentImage" src="/adm/lonIcons/'); |
'<img class="LC_contentImage" src="/adm/lonIcons/'); |
if ($resource->is_task()) { |
if ($resource->is_task()) { |
$r->print('task.gif" alt="'.&mt('Task')); |
$r->print('task.gif" alt="'.&mt('Task')); |
Line 3558 sub handler {
|
Line 3593 sub handler {
|
} |
} |
if ($env{'form.requestattempt'}) { |
if ($env{'form.requestattempt'}) { |
$symb=&unescape($env{'form.symb'}); |
$symb=&unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
if ($symb) { |
if ($symb) { |
$brcrum = &get_user_breadcrumbs($symb); |
$brcrum = &get_user_breadcrumbs($symb); |
} |
} |
Line 3587 sub handler {
|
Line 3625 sub handler {
|
push(@{$brcrum},{href=>"/adm/slotrequest?command=$env{'form.command'}",text=>$crumb_titles{$env{'form.command'}}}); |
push(@{$brcrum},{href=>"/adm/slotrequest?command=$env{'form.command'}",text=>$crumb_titles{$env{'form.command'}}}); |
} |
} |
} elsif ($env{'form.context'} eq 'user') { |
} elsif ($env{'form.context'} eq 'user') { |
if ($env{'form.symb'}) { |
if ($env{'form.symb'}) { |
$symb=&unescape($env{'form.symb'}); |
$symb = &unescape($env{'form.symb'}); |
$brcrum = &get_user_breadcrumbs($symb); |
if ($symb =~ m{^/enc/}) { |
} else { |
$symb = &Apache::lonenc::unencrypted($symb); |
$brcrum =[]; |
} |
} |
$brcrum = &get_user_breadcrumbs($symb); |
|
} else { |
|
$brcrum =[]; |
|
} |
} |
} |
} elsif (($env{'form.command'} eq 'get') && ($env{'form.context'} eq 'user')) { |
} elsif (($env{'form.command'} eq 'get') && ($env{'form.context'} eq 'user')) { |
if ($env{'form.symb'}) { |
if ($env{'form.symb'}) { |
$symb=&unescape($env{'form.symb'}); |
$symb=&unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
$brcrum = &get_user_breadcrumbs($symb); |
$brcrum = &get_user_breadcrumbs($symb); |
} else { |
} else { |
$brcrum =[]; |
$brcrum =[]; |
Line 3654 sub handler {
|
Line 3698 sub handler {
|
&show_reservations_log($r); |
&show_reservations_log($r); |
} else { |
} else { |
$symb = &unescape($env{'form.symb'}); |
$symb = &unescape($env{'form.symb'}); |
|
if ($symb =~ m{^/enc/}) { |
|
$symb = &Apache::lonenc::unencrypted($symb); |
|
} |
if (!defined($symb)) { |
if (!defined($symb)) { |
&fail($r,'not_valid'); |
&fail($r,'not_valid'); |
return OK; |
return OK; |