version 1.60, 2006/05/12 01:20:31
|
version 1.62, 2006/05/18 20:53:24
|
Line 41 sub fail {
|
Line 41 sub fail {
|
my ($r,$code)=@_; |
my ($r,$code)=@_; |
if ($code eq 'not_valid') { |
if ($code eq 'not_valid') { |
$r->print('<p>'.&mt('Unable to understand what resource you wanted to sign up for.').'</p>'); |
$r->print('<p>'.&mt('Unable to understand what resource you wanted to sign up for.').'</p>'); |
|
} elsif ($code eq 'not_available') { |
|
$r->print('<p>'.&mt('No slots are available.').'</p>'); |
} elsif ($code eq 'not_allowed') { |
} elsif ($code eq 'not_allowed') { |
$r->print('<p>'.&mt('Not allowed to sign up or change reservations at this time.').'</p>'); |
$r->print('<p>'.&mt('Not allowed to sign up or change reservations at this time.').'</p>'); |
} else { |
} else { |
Line 1146 sub show_table {
|
Line 1147 sub show_table {
|
if (exists($show{'proctor'})) { |
if (exists($show{'proctor'})) { |
$rowspan=2; |
$rowspan=2; |
@proctors= map { |
@proctors= map { |
my ($uname,$udom)=split(/@/,$_); |
my ($uname,$udom)=split(/:/,$_); |
my $fullname=$name_cache{$_}; |
my $fullname=$name_cache{$_}; |
if (!defined($fullname)) { |
if (!defined($fullname)) { |
$fullname = &Apache::loncommon::plainname($uname,$udom); |
$fullname = &Apache::loncommon::plainname($uname,$udom); |
Line 1550 sub handler {
|
Line 1551 sub handler {
|
} |
} |
} else { |
} else { |
my $symb=&Apache::lonnet::unescape($env{'form.symb'}); |
my $symb=&Apache::lonnet::unescape($env{'form.symb'}); |
|
if (!defined($symb)) { |
|
&fail($r,'not_valid'); |
|
return OK; |
|
} |
my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb); |
my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb); |
my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb); |
my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb); |
if ($useslots ne 'resource' && $useslots ne 'map') { |
if ($useslots ne 'resource' && $useslots ne 'map') { |
&fail($r,'not_valid'); |
&fail($r,'not_available'); |
return OK; |
return OK; |
} |
} |
$env{'request.symb'}=$symb; |
$env{'request.symb'}=$symb; |