version 1.67, 2006/06/22 14:53:15
|
version 1.72, 2006/12/18 14:59:16
|
Line 77 sub end_page {
|
Line 77 sub end_page {
|
=cut |
=cut |
|
|
sub get_course { |
sub get_course { |
(undef,my $courseid)=&Apache::lonxml::whichuser(); |
(undef,my $courseid)=&Apache::lonnet::whichuser(); |
my $cdom=$env{'course.'.$courseid.'.domain'}; |
my $cdom=$env{'course.'.$courseid.'.domain'}; |
my $cnum=$env{'course.'.$courseid.'.num'}; |
my $cnum=$env{'course.'.$courseid.'.num'}; |
return ($cnum,$cdom); |
return ($cnum,$cdom); |
Line 433 sub release_slot {
|
Line 433 sub release_slot {
|
|
|
if ($mgr eq 'F' |
if ($mgr eq 'F' |
&& defined($env{'form.symb'})) { |
&& defined($env{'form.symb'})) { |
$symb = $env{'form.symb'}; |
$symb = &unescape($env{'form.symb'}); |
} |
} |
|
|
my ($result,$msg) = |
my ($result,$msg) = |
Line 675 sub allowed_slot {
|
Line 675 sub allowed_slot {
|
split(',',$slot->{'allowedsections'}))) { |
split(',',$slot->{'allowedsections'}))) { |
$userallowed=1; |
$userallowed=1; |
} |
} |
|
if (defined($env{'request.course.groups'})) { |
|
my @groups = split(/:/,$env{'request.course.groups'}); |
|
my @allowed_sec = split(',',$slot->{'allowedsections'}); |
|
foreach my $group (@groups) { |
|
if (grep {$_ eq $group} (@allowed_sec)) { |
|
$userallowed=1; |
|
last; |
|
} |
|
} |
|
} |
} |
} |
&Apache::lonxml::debug("$slot_name sections is $userallowed"); |
&Apache::lonxml::debug("$slot_name sections is $userallowed"); |
|
|
Line 749 sub show_choices {
|
Line 759 sub show_choices {
|
my $text=&mt('Select'); |
my $text=&mt('Select'); |
my $command='get'; |
my $command='get'; |
if (grep(/^\Q$slot\E$/,@got_slots)) { |
if (grep(/^\Q$slot\E$/,@got_slots)) { |
$text=&mt('Free Reservation'); |
$text=&mt('Drop Reservation'); |
$command='release'; |
$command='release'; |
} else { |
} else { |
my $conflict = &check_for_conflict($symb,$slot,$slots{$slot}, |
my $conflict = &check_for_conflict($symb,$slot,$slots{$slot}, |
Line 882 sub show_table {
|
Line 892 sub show_table {
|
} |
} |
my $available; |
my $available; |
if ($mgr eq 'F') { |
if ($mgr eq 'F') { |
|
# FIXME: This line should be deleted once Slots uses breadcrumbs |
|
$r->print(&Apache::loncommon::help_open_topic('Slot About', 'Help on slots')); |
|
|
$r->print('<div>'); |
$r->print('<div>'); |
$r->print('<form method="post" action="/adm/slotrequest"> |
$r->print('<form method="post" action="/adm/slotrequest"> |
<input type="hidden" name="command" value="uploadstart" /> |
<input type="hidden" name="command" value="uploadstart" /> |
<input type="submit" name="start" value="'.&mt('Upload Slot List').'" /> |
<input type="submit" name="start" value="'.&mt('Upload Slot List').'" /> |
</form>'); |
</form>'); |
|
$r->print(&Apache::loncommon::help_open_topic('Slot CommaDelimited')); |
$r->print('<form method="post" action="/adm/helper/newslot.helper"> |
$r->print('<form method="post" action="/adm/helper/newslot.helper"> |
<input type="submit" name="newslot" value="'.&mt('Create a New Slot').'" /> |
<input type="submit" name="newslot" value="'.&mt('Create a New Slot').'" /> |
</form>'); |
</form>'); |
|
$r->print(&Apache::loncommon::help_open_topic('Slot AddInterface')); |
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
|
|
Line 1268 sub csvuploadmap_header {
|
Line 1283 sub csvuploadmap_header {
|
|
|
my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); |
my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); |
my $ignore=&mt('Ignore First Line'); |
my $ignore=&mt('Ignore First Line'); |
|
my $help_field = &Apache::loncommon::help_open_topic('Slot SelectingField'); |
|
|
$r->print(<<ENDPICK); |
$r->print(<<ENDPICK); |
<form method="post" enctype="multipart/form-data" action="/adm/slotrequest" name="slotupload"> |
<form method="post" enctype="multipart/form-data" action="/adm/slotrequest" name="slotupload"> |
<h3>Identify fields</h3> |
<h3>Identify fields $help_field</h3> |
Total number of records found in file: $distotal <hr /> |
Total number of records found in file: $distotal <hr /> |
Enter as many fields as you can. The system will inform you and bring you back |
Enter as many fields as you can. The system will inform you and bring you back |
to this page if the data selected is insufficient to create the slots.<hr /> |
to this page if the data selected is insufficient to create the slots.<hr /> |