version 1.22, 2005/10/14 20:00:34
|
version 1.23, 2005/10/17 18:23:46
|
Line 470 sub show_table {
|
Line 470 sub show_table {
|
$r->print('<table border="1"> |
$r->print('<table border="1"> |
<tr> |
<tr> |
<th></th> |
<th></th> |
<th>'.$linkstart.'name" >Slot name</a></th> |
<th>'.$linkstart.'name" >Slot name</a></th> |
<th>'.$linkstart.'type" >Type</a></th> |
<th>'.$linkstart.'type" >Type</a></th> |
<th>'.$linkstart.'description">Description</a></th> |
<th>'.$linkstart.'description" >Description</a></th> |
<th>'.$linkstart.'starttime" >Start Time</a></th> |
<th>'.$linkstart.'starttime" >Start Time</a></th> |
<th>'.$linkstart.'endtime" >End Time</a></th> |
<th>'.$linkstart.'endtime" >End Time</a></th> |
<th>'.$linkstart.'secret" >Secret</a></th> |
<th>'.$linkstart.'startreserve">Time Students Can Start Reserving</a></th> |
<th>'.$linkstart.'maxspace" >Max space</a></th> |
<th>'.$linkstart.'secret" >Secret</a></th> |
<th> Scheduled Students</th> |
<th>'.$linkstart.'maxspace" >Max space</a></th> |
<th>'.$linkstart.'unique" >Unique Period</a></th> |
<th> Scheduled Students</th> |
|
<th>'.$linkstart.'unique" >Unique Period</a></th> |
</tr>'); |
</tr>'); |
my %name_cache; |
my %name_cache; |
my $slotsort = sub { |
my $slotsort = sub { |
if ($env{'form.order'}=~/^(type|name|description|endtime|maxspace)$/) { |
if ($env{'form.order'}=~/^(type|description|endtime|maxspace)$/) { |
if (lc($slots{$a}->{$env{'form.order'}}) |
if (lc($slots{$a}->{$env{'form.order'}}) |
ne lc($slots{$b}->{$env{'form.order'}})) { |
ne lc($slots{$b}->{$env{'form.order'}})) { |
return (lc($slots{$a}->{$env{'form.order'}}) |
return (lc($slots{$a}->{$env{'form.order'}}) |
cmp lc($slots{$b}->{$env{'form.order'}})); |
cmp lc($slots{$b}->{$env{'form.order'}})); |
} |
} |
|
} elsif ($env{'form.order'} eq 'name') { |
|
if (lc($a) cmp lc($b)) { |
|
return lc($a) cmp lc($b); |
|
} |
} elsif ($env{'form.order'} eq 'unique') { |
} elsif ($env{'form.order'} eq 'unique') { |
|
|
if ($slots{$a}->{'uniqueperiod'}[0] |
if ($slots{$a}->{'uniqueperiod'}[0] |
Line 516 sub show_table {
|
Line 521 sub show_table {
|
my (undef,$id)=split("\0",$entry); |
my (undef,$id)=split("\0",$entry); |
$ids.= $id.'-> '.$consumed{$entry}->{'name'}.'<br />'; |
$ids.= $id.'-> '.$consumed{$entry}->{'name'}.'<br />'; |
} |
} |
my $start=localtime($slots{$slot}->{'starttime'}); |
my $start=&Apache::lonlocal::locallocaltime($slots{$slot}->{'starttime'}); |
my $end=localtime($slots{$slot}->{'endtime'}); |
my $end=&Apache::lonlocal::locallocaltime($slots{$slot}->{'endtime'}); |
|
my $start_reserve=&Apache::lonlocal::locallocaltime($slots{$slot}->{'startreserve'}); |
my $unique; |
my $unique; |
if (ref($slots{$slot}{'uniqueperiod'})) { |
if (ref($slots{$slot}{'uniqueperiod'})) { |
$unique=localtime($slots{$slot}{'uniqueperiod'}[0]).','. |
$unique=localtime($slots{$slot}{'uniqueperiod'}[0]).','. |
Line 552 EDITFORM
|
Line 558 EDITFORM
|
<td>$description</td> |
<td>$description</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
|
<td>$start_reserve</td> |
<td>$slots{$slot}->{'secret'}</td> |
<td>$slots{$slot}->{'secret'}</td> |
<td>$slots{$slot}->{'maxspace'}</td> |
<td>$slots{$slot}->{'maxspace'}</td> |
<td>$ids</td> |
<td>$ids</td> |
<td>$unique</td> |
<td>$unique</td> |
</tr> |
</tr> |
<tr> |
<tr> |
<td colspan="8">$proctors</td> |
<td colspan="10">$proctors</td> |
</tr> |
</tr> |
STUFF |
STUFF |
} |
} |
Line 763 sub csv_upload_assign {
|
Line 770 sub csv_upload_assign {
|
if ($entries{$fields{'endtime'}}) { |
if ($entries{$fields{'endtime'}}) { |
$slot{'endtime'}=&UnixDate($entries{$fields{'endtime'}},"%s"); |
$slot{'endtime'}=&UnixDate($entries{$fields{'endtime'}},"%s"); |
} |
} |
|
if ($entries{$fields{'startreserve'}}) { |
|
$slot{'startreserve'}= |
|
&UnixDate($entries{$fields{'startreserve'}},"%s"); |
|
} |
foreach my $key ('ip','proctor','description','maxspace', |
foreach my $key ('ip','proctor','description','maxspace', |
'secret','symb') { |
'secret','symb') { |
if ($entries{$fields{$key}}) { |
if ($entries{$fields{$key}}) { |