'.&mt('Open after').' '.
+ ''.&mt('Open after').' '.
&Apache::lonhtmlcommon::date_setter($chooserform,'start',$starttime,'','','','','','','',1,1).
- ' '.&mt('Closed before').' '.
+ ' '.&mt('Closed before').' '.
&Apache::lonhtmlcommon::date_setter($chooserform,'end',$endtime,'','','','','','','',1,1).
'
'.
' '.
'';
}
if ($env{'form.command'} eq 'manageresv') {
- $output .= '
';
+ $output .= ''.
+ ''.&mt('Action').' '.&mt('Name').' ';
} else {
- $output .= &Apache::loncommon::start_data_table();
+ $output .= &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ ''.&mt('Action').' '.&mt('Name').' '.
+ &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}) {
my $description=&get_description($slot,$slots->{$slot});
my $form;
@@ -1559,7 +1591,6 @@ ENDSCRIPT
}
}
}
- my $escsymb=&escape($symb);
if (!$form) {
my $name;
if ($formname) {
@@ -1572,7 +1603,7 @@ ENDSCRIPT
$form=<
-
+
@@ -1685,11 +1716,20 @@ sub remove_link {
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);
$entry = &escape($entry);
$uname = &escape($uname);
$udom = &escape($udom);
- $symb = &escape($symb);
+ $symb = &escape($shownsymb);
return <<"END_LINK";
'.
+ 'id="arrow'.$mapnum.'" '.'alt="arrow" onmouseover="this.style.cursor=\'pointer\'" tabindex="0" '.
+ 'onclick="'."toggleSlotMap('$mapnum','$rownum');".'" onkeydown="'."toggleSlotMap('$mapnum','$rownum');".'" />'.
$icon.(' ' x6).''."\n";
if (ref($output{$currmap}) eq 'HASH') {
my $formnum = $mapnum.'_'.$reservable+1;
@@ -2365,6 +2405,14 @@ sub manage_reservations {
$currcontainer = $parent{$depth};
} elsif (ref($resource)) {
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() &&
!$resource->is_sequence() && !$resource->is_page());
$count ++;
@@ -2396,7 +2444,7 @@ sub manage_reservations {
for (my $i=0; $i<$depth; $i++) {
$r->print(' ');
}
- $r->print(''.
+ $r->print(' '.
' '...',
+ no_mt => 1});
+ }
+ }
+ unless ((($crstype eq 'Placement') && (!$env{'request.role.adv'})) || (@mapcrumbs) ||
+ (!$maptitle) || ($maptitle eq 'default.sequence') ||
+ ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'}) ||
+ ($ltiscope eq 'resource')) {
+ push(@crumbs, {text => $maptitle, no_mt => 1,
+ href => &Apache::lonnet::clutter($mapurl).'?navmap=1'});
+ }
+ if ($restitle && !@mapcrumbs) {
+ push(@crumbs,{text => $restitle, no_mt => 1});
+ }
+ return \@crumbs;
+}
+
sub handler {
my $r=shift;
@@ -3458,7 +3561,7 @@ sub handler {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
my %crumb_titles = &slot_command_titles();
- my ($brcrum,$bread_crumbs_component);
+ my ($symb,$brcrum,$bread_crumbs_component);
my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});
my $mgr=&Apache::lonnet::allowed('mgr',$env{'request.course.id'});
@@ -3488,6 +3591,15 @@ sub handler {
$title = 'Manage Reservations';
$brcrum =[{href=>"/adm/slotrequest?command=manageresv",text=>$title}];
}
+ if ($env{'form.requestattempt'}) {
+ $symb=&unescape($env{'form.symb'});
+ if ($symb =~ m{^/enc/}) {
+ $symb = &Apache::lonenc::unencrypted($symb);
+ }
+ if ($symb) {
+ $brcrum = &get_user_breadcrumbs($symb);
+ }
+ }
my ($cnum,$cdom)=&get_course();
%slots = &Apache::lonnet::get_course_slots($cnum,$cdom);
$consumed_uniqueperiods = &get_consumed_uniqueperiods(\%slots);
@@ -3507,19 +3619,38 @@ sub handler {
} elsif ($env{'form.command'} eq 'release') {
if ($env{'form.context'} eq 'usermanage') {
$brcrum =[{href=>"/adm/slotrequest?command=manageresv",
- text=>$crumb_titles{'showslots'}}];
+ text=>$crumb_titles{'manageresv'}}];
$title = 'Manage Reservations';
if (ref($brcrum) eq 'ARRAY') {
push(@{$brcrum},{href=>"/adm/slotrequest?command=$env{'form.command'}",text=>$crumb_titles{$env{'form.command'}}});
}
+ } elsif ($env{'form.context'} eq 'user') {
+ if ($env{'form.symb'}) {
+ $symb = &unescape($env{'form.symb'});
+ if ($symb =~ m{^/enc/}) {
+ $symb = &Apache::lonenc::unencrypted($symb);
+ }
+ $brcrum = &get_user_breadcrumbs($symb);
+ } else {
+ $brcrum =[];
+ }
+ }
+ } elsif (($env{'form.command'} eq 'get') && ($env{'form.context'} eq 'user')) {
+ if ($env{'form.symb'}) {
+ $symb=&unescape($env{'form.symb'});
+ if ($symb =~ m{^/enc/}) {
+ $symb = &Apache::lonenc::unencrypted($symb);
+ }
+ $brcrum = &get_user_breadcrumbs($symb);
+ } else {
+ $brcrum =[];
}
} else {
$brcrum =[];
}
- my ($symb,$js,$available,$allavailable,$got_slots);
+ my ($js,$available,$allavailable,$got_slots);
$available = [];
if ($env{'form.requestattempt'}) {
- $symb=&unescape($env{'form.symb'});
@{$got_slots}=&check_for_reservation($symb,'allslots');
}
if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
@@ -3566,7 +3697,10 @@ sub handler {
} elsif (($env{'form.command'} eq 'slotlog') && ($vgr eq 'F')) {
&show_reservations_log($r);
} else {
- my $symb=&unescape($env{'form.symb'});
+ $symb = &unescape($env{'form.symb'});
+ if ($symb =~ m{^/enc/}) {
+ $symb = &Apache::lonenc::unencrypted($symb);
+ }
if (!defined($symb)) {
&fail($r,'not_valid');
return OK;
@@ -3591,9 +3725,9 @@ sub handler {
return OK;
}
if ($env{'form.requestattempt'}) {
- $r->print('');
- $r->print(&show_choices($symb,undef,undef,undef,\%slots,$consumed_uniqueperiods,$available,$got_slots));
- $r->print('
');
+ $r->print(''.
+ &show_choices($symb,undef,0,undef,\%slots,$consumed_uniqueperiods,$available,$got_slots).
+ '
');
} elsif ($env{'form.command'} eq 'release') {
&release_slot($r,$symb);
} elsif ($env{'form.command'} eq 'get') {