version 1.111, 2011/12/18 17:15:03
|
version 1.112, 2011/12/20 22:44:27
|
Line 137 sub check_for_reservation {
|
Line 137 sub check_for_reservation {
|
return 'error: Unable to determine current status'; |
return 'error: Unable to determine current status'; |
} |
} |
my @got; |
my @got; |
my @sorted_slots = &Apache::loncommon::sorted_slots(\@slots,\%slots); |
my @sorted_slots = &Apache::loncommon::sorted_slots(\@slots,\%slots,'starttime'); |
foreach my $slot_name (@sorted_slots) { |
foreach my $slot_name (@sorted_slots) { |
next if (!defined($slots{$slot_name}) || |
next if (!defined($slots{$slot_name}) || |
!ref($slots{$slot_name})); |
!ref($slots{$slot_name})); |
Line 842 sub show_choices {
|
Line 842 sub show_choices {
|
my ($r,$symb,$formname)=@_; |
my ($r,$symb,$formname)=@_; |
|
|
my ($cnum,$cdom)=&get_course(); |
my ($cnum,$cdom)=&get_course(); |
my %slots=&Apache::lonnet::dump('slots',$cdom,$cnum); |
my %slots = &Apache::lonnet::get_course_slots($cnum,$cdom); |
my $consumed_uniqueperiods = &get_consumed_uniqueperiods(\%slots); |
my $consumed_uniqueperiods = &get_consumed_uniqueperiods(\%slots); |
if (ref($consumed_uniqueperiods) eq 'HASH') { |
if (ref($consumed_uniqueperiods) eq 'HASH') { |
if (&Apache::lonnet::error(%$consumed_uniqueperiods)) { |
if (&Apache::lonnet::error(%$consumed_uniqueperiods)) { |
Line 1566 sub manage_reservations {
|
Line 1566 sub manage_reservations {
|
} elsif ($slot_status == $resource->RESERVABLE) { |
} elsif ($slot_status == $resource->RESERVABLE) { |
$msg=&mt('Reservation needed'); |
$msg=&mt('Reservation needed'); |
$get_choices = 1; |
$get_choices = 1; |
|
} elsif ($slot_status == $resource->RESERVABLE_LATER) { |
|
$msg=&mt('Reservation needed: will be reservable later.'); |
} elsif ($slot_status == $resource->NOTRESERVABLE) { |
} elsif ($slot_status == $resource->NOTRESERVABLE) { |
$msg=&mt('Reservation needed: none available.'); |
$msg=&mt('Reservation needed: none available.'); |
} elsif ($slot_status == $resource->UNKNOWN) { |
} elsif ($slot_status == $resource->UNKNOWN) { |
Line 2494 sub csv_upload_assign {
|
Line 2496 sub csv_upload_assign {
|
$r->rflush(); |
$r->rflush(); |
$countdone++; |
$countdone++; |
} |
} |
|
if ($countdone) { |
|
&Apache::lonnet::devalidate_slots_cache($cname,$cdom); |
|
} |
$r->print('<p>'.&mt('Created [quant,_1,slot]',$countdone)."\n".'</p>'); |
$r->print('<p>'.&mt('Created [quant,_1,slot]',$countdone)."\n".'</p>'); |
foreach my $error (@errors) { |
foreach my $error (@errors) { |
$r->print('<p><span class="LC_warning">'.$error.'</span></p>'."\n"); |
$r->print('<p><span class="LC_warning">'.$error.'</span></p>'."\n"); |