[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm

raeburn raeburn at source.lon-capa.org
Sun Jul 7 18:06:04 EDT 2019


raeburn		Sun Jul  7 22:06:04 2019 EDT

  Modified files:              
    /loncom/interface	slotrequest.pm 
  Log:
  - Remove span tags and assign LC_error class to enclosing p tags.
  - Remove some training white space.
  - Standard indent is 4 spaces.
  
  
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.141 loncom/interface/slotrequest.pm:1.142
--- loncom/interface/slotrequest.pm:1.141	Fri Jun 28 19:46:03 2019
+++ loncom/interface/slotrequest.pm	Sun Jul  7 22:06:04 2019
@@ -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.141 2019/06/28 19:46:03 raeburn Exp $
+# $Id: slotrequest.pm,v 1.142 2019/07/07 22:06:04 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -769,7 +769,7 @@
     my ($result,$msg) =
 	&release_reservation($slot_name,$uname,$udom,$symb,$mgr);
     if (!$result) {
-        $r->print('<p><span class="LC_error">'.&mt($msg).'</span></p>');
+        $r->print('<p class="LC_error">'.&mt($msg).'</p>');
     } else {
         $r->print("<p>$msg</p>");
     }
@@ -941,7 +941,7 @@
             } else {
                 if (keys(%to_delete)) {
                     $msg = &mt('Reservation release partially complete for [_1]',$description);
-                } else { 
+                } else {
                     $msg = &mt('No entries found for this user to release for [_1].',$description);
                 }
                 return (0,$msg);
@@ -995,7 +995,7 @@
 
     #
     # If release is *not* because of a reservation change, i.e., this is a "drop"
-    # by a student, or a removal for a single student by an instructor then 
+    # by a student, or a removal for a single student by an instructor then
     # only remove one entry from slot_reservations.db, where both the user
     # and the symb match the current context.  If useslots was set to map or
     # map_map, then the symb to match in slot_reservations.db is the symb of
@@ -1006,7 +1006,7 @@
     if ($parm_level == 2) {
         $symb_to_check = $map_symb;
     } else {
-        $symb_to_check = $parm_symb; 
+        $symb_to_check = $parm_symb;
     }
     foreach my $entry (keys(%consumed)) {
         if ( $consumed{$entry}->{'name'} eq ($uname.':'.$udom) ) {
@@ -1024,16 +1024,16 @@
                                $cnum,$udom,$uname,$context) =~ /^error/) {
             if ($mgr eq 'F') {
                 $msg = &mt('Reservation release partially complete for: [_1]',"$uname:$udom").'<br />'.
-                       &mt('Update of availablestudent parameter for [_1] was not completed.',"$uname:$udom"); 
+                       &mt('Update of availablestudent parameter for [_1] was not completed.',"$uname:$udom");
             } else {
                 $msg = &mt('Release partially complete for: [_1]',$description);
             }
             return (0,$msg);
         } else {
             if ($mgr eq 'F') {
-	        $msg = &mt('Released Reservation for user: [_1]',"$uname:$udom");
+                $msg = &mt('Released Reservation for user: [_1]',"$uname:$udom");
             } else {
-	        $msg = '<span style="font-weight: bold;">'.&mt('Released reservation: [_1]',$description).'</span><br /><br />';
+                $msg = '<span style="font-weight: bold;">'.&mt('Released reservation: [_1]',$description).'</span><br /><br />';
                 my $person = &Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'});
                 my $subject = &mt('Reservation change: [_1]',$description);
                 my $msgbody = &mt('Reservation released by [_1] for [_2].',$person,$description);
@@ -1119,7 +1119,7 @@
 	if ($ret eq 'ok') {
 	    $r->print('<p>'.&mt('Slot [_1] marked as deleted.','<tt>'.$slot_name.'</tt>').'</p>');
 	} else {
-	    $r->print('<p><span class="LC_error">'.&mt('An error occurred when attempting to delete slot: [_1]','<tt>'.$slot_name.'</tt>')." ($ret)</span></p>");
+	    $r->print('<p class="LC_error">'.&mt('An error occurred when attempting to delete slot: [_1]','<tt>'.$slot_name.'</tt>')." ($ret)</p>");
 	}
     } else {
 	if (%consumed) {
@@ -1151,9 +1151,9 @@
     my $slot_name=&check_for_conflict($symb,$env{'form.slotname'},\%slot);
 
     if ($slot_name =~ /^error: (.*)/) {
-	$r->print('<p><span class="LC_error">'
+	$r->print('<p class="LC_error">'
                  .&mt('An error occurred while attempting to make a reservation. ([_1])',$1)
-                 .'</span></p>');
+                 .'</p>');
 	&return_link($r);
 	return 0;
     }
@@ -1206,9 +1206,9 @@
     if (defined($reserved)) {
 	my $retvalue = 0;
 	if ($slot_name =~ /^error: (.*)/) {
-	    $r->print('<p><span class="LC_error">'
+	    $r->print('<p class="LC_error">'
                      .&mt('An error occurred while attempting to make a reservation. ([_1])',$1)
-                     .'</span></p>');
+                     .'</p>');
 	} elsif ($reserved > -1) {
 	    $r->print('<p style="font-weight: bold;">'.&mt('Successfully signed up:  [_1]',$description).'</p>');
 	    $retvalue = 1;




More information about the LON-CAPA-cvs mailing list