[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm
raeburn
raeburn at source.lon-capa.org
Wed Jul 12 11:48:23 EDT 2023
raeburn Wed Jul 12 15:48:23 2023 EDT
Modified files:
/loncom/interface slotrequest.pm
Log:
- Remove trailing whitespace. No code changes.
-------------- next part --------------
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.146 loncom/interface/slotrequest.pm:1.147
--- loncom/interface/slotrequest.pm:1.146 Sat Jul 8 16:57:47 2023
+++ loncom/interface/slotrequest.pm Wed Jul 12 15:48:23 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.146 2023/07/08 16:57:47 raeburn Exp $
+# $Id: slotrequest.pm,v 1.147 2023/07/12 15:48:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -50,7 +50,7 @@
} else {
$r->print('<p>'.&mt('Failed.').'</p>');
}
-
+
&return_link($r);
&end_page($r);
}
@@ -60,8 +60,8 @@
my $args;
if (ref($brcrum) eq 'ARRAY') {
$args = {bread_crumbs => $brcrum};
- if ($bread_crumbs_component) {
- $args->{bread_crumbs_component} = $bread_crumbs_component;
+ if ($bread_crumbs_component) {
+ $args->{bread_crumbs_component} = $bread_crumbs_component;
}
}
if (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
@@ -284,7 +284,7 @@
}
if (slotpicks.length) {
for (var i=0; i<slotpicks.length; i++) {
- slotpicks[i].checked = false;
+ slotpicks[i].checked = false;
}
}
}
@@ -333,7 +333,7 @@
for (var i=0; i<resrows.length; i++) {
resrows[i].style.display = rowdisplay;
if (rowdisplay == 'table-row') {
- mapbgidx ++;
+ mapbgidx ++;
var bgcolnew = mapbgidx % 2;
var bgcolold = (mapbgidx+1) % 2;
var k = i+parseInt(rownum)+1;
@@ -368,7 +368,7 @@
if (table.rows[i].style.display != 'none') {
idx ++;
var bgcolnew = idx % 2;
- var bgcolold = (idx+1) % 2;
+ var bgcolold = (idx+1) % 2;
j = i+1;
if (document.getElementById('LC_slotmaprow_'+j)) {
document.getElementById('LC_slotmaprow_'+j).className = rowclasses[bgcolnew];
@@ -412,7 +412,7 @@
sub get_reservation_ids {
my ($slot_name)=@_;
-
+
my ($cnum,$cdom)=&get_course();
my %consumed=&Apache::lonnet::dump('slot_reservations',$cdom,$cnum,
@@ -457,7 +457,7 @@
|| &Apache::lonnet::error($course)
|| &Apache::lonnet::error(%slots)) {
return 'error: Unable to determine current status';
- }
+ }
my @got;
my @sorted_slots = &Apache::loncommon::sorted_slots(\@slots,\%slots,'starttime');
foreach my $slot_name (@sorted_slots) {
@@ -592,7 +592,7 @@
foreach my $other_slot (split(/:/, $value)) {
if ($other_slot eq $slot_name) {
my %consumed=&Apache::lonnet::dump('slot_reservations', $cdom,
- $cnum, "^$slot_name\0");
+ $cnum, "^$slot_name\0");
if (&Apache::lonnet::error($value)) {
return 'error: Unable to determine current status';
}
@@ -618,14 +618,14 @@
my $num=(split('\0',$id))[1];
if ($num > $last) { $last=$num; }
}
-
+
my $wanted=$last+1;
&Apache::lonxml::debug("wanted $wanted<br />");
if (scalar(@ids) >= $max) {
# full up
return undef;
}
-
+
my %reservation=('name' => $env{'user.name'}.':'.$env{'user.domain'},
'timestamp' => time,
'symb' => $symb_for_db);
@@ -704,7 +704,7 @@
sub remove_registration_user {
my ($r) = @_;
-
+
my $slot_name = $env{'form.slotname'};
my $name = &Apache::loncommon::plainname($env{'form.uname'},
@@ -714,7 +714,7 @@
my $msg = &mt('Remove [_1] from slot [_2] for [_3]',
$name,$slot_name,$title);
-
+
&remove_registration_confirmation($r,$msg,['uname','udom','slotname',
'entry','symb','context']);
}
@@ -750,14 +750,14 @@
sub release_all_slot {
my ($r,$mgr)=@_;
-
+
my $slot_name = $env{'form.slotname'};
my ($cnum,$cdom)=&get_course();
my %consumed=&Apache::lonnet::dump('slot_reservations',$cdom,$cnum,
"^$slot_name\0");
-
+
$r->print('<p>'.&mt('Releasing reservations').'</p>');
foreach my $entry (sort { $consumed{$a}{'name'} cmp
@@ -801,7 +801,7 @@
} else {
$r->print("<p>$msg</p>");
}
-
+
if ($mgr eq 'F') {
$r->print('<p><a href="/adm/slotrequest?command=showslots">'.
&mt('Return to slot list').'</a></p>');
@@ -1166,7 +1166,7 @@
my $target = &return_target();
if (($env{'form.command'} eq 'manageresv') || ($env{'form.context'} eq 'usermanage')) {
$r->print('<p><a href="/adm/slotrequest?command=manageresv" target="'.$target.'">'.
- &mt('Return to reservations').'</a></p>');
+ &mt('Return to reservations').'</a></p>');
} else {
$r->print('<p><a href="/adm/flip?postdata=return:" target="'.$target.'">'.
&mt('Return to last resource').'</a></p>');
@@ -1340,7 +1340,7 @@
if (($slot->{'endreserve'}) &&
($slot->{'endreserve'} < time)) {
return 0;
- }
+ }
&Apache::lonxml::debug("$slot_name reserve good");
my $userallowed=0;
@@ -1487,7 +1487,7 @@
);
foreach my $option (@options) {
my $onclick = "toggleSlotDisplay(this.form,'$num');";
- if (($option eq 'show') && ($env{'form.command'} eq 'manageresv')) {
+ if (($option eq 'show') && ($env{'form.command'} eq 'manageresv')) {
$onclick .= "currSlotDisplay$num(this.form,'$num');";
}
$output .= '<span class="LC_nobreak"><label>'.
@@ -1507,7 +1507,7 @@
// <![CDATA[
function currSlotDisplay$num() {
var currslot = new Array($numreserved);
-$js
+$js
for (var j=0; j<$numreserved; j++) {
if (document.getElementById('LC_slotrow_$num\_'+currslot[j])) {
document.getElementById('LC_slotrow_$num\_'+currslot[j]).style.display = '';
@@ -1670,7 +1670,7 @@
}
return 0;
}
-
+
return 1;
}
@@ -1730,7 +1730,7 @@
);
return;
}
-
+
my %Saveable_Parameters = ('show' => 'array',
'when' => 'scalar',
'order' => 'scalar',
@@ -1820,7 +1820,7 @@
my $name_filter = {'type' => $name_filter_type,
'value' => $env{'form.name_filter_value'},};
-
+
#deleted slot filtering
#default to hide if no value
$env{'form.deleted'} ||= 'hide';
@@ -1900,7 +1900,7 @@
return lc($a) cmp lc($b);
}
} elsif ($env{'form.order'} eq 'uniqueperiod') {
-
+
if ($slots{$a}->{'uniqueperiod'}[0]
ne $slots{$b}->{'uniqueperiod'}[0]) {
return ($slots{$a}->{'uniqueperiod'}[0]
@@ -1934,7 +1934,7 @@
}
my $description=&get_description($slot,$slots{$slot});
my ($id_count,$ids);
-
+
if (exists($show{'scheduled'}) || exists($show{'space'}) ) {
my $re_str = "$slot\0";
my @this_slot = grep(/^\Q$re_str\E/,keys(%consumed));
@@ -2488,7 +2488,7 @@
}
}
}
- next if ($exclude);
+ next if ($exclude);
}
}
}
@@ -3024,7 +3024,7 @@
}
sub upload_start {
- my ($r)=@_;
+ my ($r)=@_;
$r->print(
&Apache::grades::checkforfile_js()
.'<h2>'.&mt('Upload a file containing the slot definitions').'</h2>'
@@ -3477,7 +3477,7 @@
if (ref($brcrum) eq 'ARRAY') {
push(@{$brcrum},{href=>"/adm/slotrequest?command=showresv",text=>$title});
}
- } elsif (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
+ } elsif (($env{'form.requestattempt'}) || ($env{'form.command'} eq 'manageresv')) {
if ($env{'form.command'} eq 'manageresv') {
$title = 'Manage Reservations';
$brcrum =[{href=>"/adm/slotrequest?command=manageresv",text=>$title}];
More information about the LON-CAPA-cvs
mailing list