[LON-CAPA-cvs] cvs: loncom /interface coursecatalog.pm lonaboutme.pm loncoursegroups.pm loncreatecourse.pm lonparmset.pm lonpreferences.pm lonsyllabus.pm lontrackstudent.pm lonuserutils.pm portfolio.pm

bisitz bisitz at source.lon-capa.org
Thu Oct 4 09:41:11 EDT 2012


bisitz		Thu Oct  4 13:41:11 2012 EDT

  Modified files:              
    /loncom/interface	coursecatalog.pm lonaboutme.pm loncoursegroups.pm 
                     	loncreatecourse.pm lonparmset.pm 
                     	lonpreferences.pm lonsyllabus.pm 
                     	lontrackstudent.pm lonuserutils.pm portfolio.pm 
  Log:
  Use standard styles (info/warning/error)
  
  
-------------- next part --------------
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.70 loncom/interface/coursecatalog.pm:1.71
--- loncom/interface/coursecatalog.pm:1.70	Wed Apr 18 19:47:36 2012
+++ loncom/interface/coursecatalog.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for displaying the course catalog interface
 #
-# $Id: coursecatalog.pm,v 1.70 2012/04/18 19:47:36 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.71 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -662,9 +662,15 @@
         }
         if (keys(%courses) == 0) {
             if ($env{'form.currcat_0'} eq 'communities::0') {
-                $output = &mt('No communities match the criteria you selected.');
+                $output =
+                    '<p class="LC_info">'
+                   .&mt('No communities match the criteria you selected.')
+                   .'</p>';
             } else {
-                $output = &mt('No courses match the criteria you selected.');
+                $output =
+                    '<p class="LC_info">'
+                   .&mt('No courses match the criteria you selected.')
+                   .'</p>';
             }
             return $output;
         }
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.148 loncom/interface/lonaboutme.pm:1.149
--- loncom/interface/lonaboutme.pm:1.148	Mon Oct 17 12:41:30 2011
+++ loncom/interface/lonaboutme.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Personal Information Page
 #
-# $Id: lonaboutme.pm,v 1.148 2011/10/17 12:41:30 raeburn Exp $
+# $Id: lonaboutme.pm,v 1.149 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -121,7 +121,7 @@
                     $r->print('\noindent{\large\textbf{'.&mt('No user personal information page available').'}}\\\\\\\\');
                 } else {
                     $r->print(&Apache::loncommon::start_page("Personal Information Page"));
-                    $r->print('<h2>'.&mt('No user personal information page available') .'</h2>'.
+                    $r->print('<p class="_LC_info">'.&mt('No user personal information page available') .'</p>'.
                         &mt('This is a result of one of the following:').'<ul>'.
                         '<li>'.&mt('The administrator of this domain has disabled personal information page functionality for this specific user.').'</li>'.
                         '<li>'.&mt('The domain has been configured to disable, by default, personal information page functionality for all users in the domain.').'</li>'.
@@ -409,7 +409,7 @@
         }
         if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');}
     } else {
-        $r->print('<p>'.&mt('No personal information provided').'.</p>');
+        $r->print('<p class="LC_info">'.&mt('No personal information provided').'.</p>');
     }
 
     if ($env{'request.course.id'}
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.114 loncom/interface/loncoursegroups.pm:1.115
--- loncom/interface/loncoursegroups.pm:1.114	Sat Jul 21 21:20:06 2012
+++ loncom/interface/loncoursegroups.pm	Thu Oct  4 13:41:10 2012
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.114 2012/07/21 21:20:06 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.115 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -416,7 +416,12 @@
                 }
             }
         } else {
-            $r->print(&mt('You are not currently a member of any active '.$gpterm.'s in this '.lc($crstype).'.'));
+            $r->print(
+                '<p class="LC_info">'
+               .&mt('You are not currently a member of any active '.$gpterm.'s'
+                   .' in this '.lc($crstype).'.')
+               .'</p>'
+            );
         }
     }
     return;
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.145 loncom/interface/loncreatecourse.pm:1.146
--- loncom/interface/loncreatecourse.pm:1.145	Thu Sep 23 21:25:43 2010
+++ loncom/interface/loncreatecourse.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.145 2010/09/23 21:25:43 www Exp $
+# $Id: loncreatecourse.pm,v 1.146 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -405,7 +405,7 @@
                  .' <input type="text" size="5" name="dateshift" value="365" />'
                  .&Apache::lonhtmlcommon::row_closure()
                  .&Apache::lonhtmlcommon::row_headline()
-                 .$lt{'asov'}
+                 .'<span class="LC_info">'.$lt{'asov'}.'</span>'
                  .&Apache::lonhtmlcommon::row_closure(1)
                  .&Apache::lonhtmlcommon::end_pick_box()
                  .'</td>'
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.526 loncom/interface/lonparmset.pm:1.527
--- loncom/interface/lonparmset.pm:1.526	Mon Aug 27 15:33:38 2012
+++ loncom/interface/lonparmset.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.526 2012/08/27 15:33:38 raeburn Exp $
+# $Id: lonparmset.pm,v 1.527 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3519,7 +3519,7 @@
     my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder);
 
     $r->print(&tableend().'<p>'.
-    ($foundkeys?'<input type="submit" value="'.&mt('Save').'" />':&mt('There are no parameters.')).'</p></form>'.
+    ($foundkeys?'<input type="submit" value="'.&mt('Save').'" />':'<span class="LC_info">'.&mt('There are no parameters.').'</span>').'</p></form>'.
           &Apache::loncommon::end_page());
 }
 
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.198 loncom/interface/lonpreferences.pm:1.199
--- loncom/interface/lonpreferences.pm:1.198	Thu Aug 16 17:02:55 2012
+++ loncom/interface/lonpreferences.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.198 2012/08/16 17:02:55 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.199 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1346,8 +1346,11 @@
     } elsif ($caller eq 'reset_by_email') {
             my %data = &Apache::lonnet::tmpget($mailtoken);
             if (keys(%data) == 0) {
-                $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
-                             ,'<a href="/adm/resetpw">','</a>')
+                $r->print(
+                    '<p class="LC_warning">'
+                   .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
+                       ,'<a href="/adm/resetpw">','</a>')
+                   .'</p>'
                 );
                 return;
             }
@@ -1357,18 +1360,32 @@
                     $domain = $data{'domain'};
                     $currentpass = $data{'temppasswd'};
                 } else {
-                    $r->print(&mt('Sorry, the token generated when you requested a password reset has expired.').'<br />');
+                    $r->print(
+                        '<p class="LC_warning">'
+                       .&mt('Sorry, the token generated when you requested'
+                           .' a password reset has expired.')
+                       .'</p>'
+                    );
                     return;
                 }
             } else {
-                $r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'<br />');
+                $r->print(
+                    '<p class="LC_warning">'
+                   .&mt('Sorry, the URL generated when you requested reset of'
+                       .' your password contained incomplete information.')
+                   .'</p>'
+                );
                 return;
             }
             if (&Apache::lonnet::domain($domain) eq '') {
                 $domain = $r->dir_config('lonDefDomain');
             }
     } else {
-        $r->print(&mt('Page requested in unexpected context').'<br />');
+        $r->print(
+            '<p class="LC_error">'
+           .&mt('Page requested in unexpected context')
+           .'</p>'
+        );
         return;
     }
     my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);
@@ -1640,14 +1657,14 @@
     } 
     if ($newpass1 ne $newpass2) {
 	&passwordchanger($r,
-			 '<span class="LC_error">'.
+			 '<span class="LC_warning">'.
 			 &mt('The new passwords you entered do not match.').'  '.
 			 &mt('Please try again.').'</span>',$caller,$mailtoken);
 	return 1;
     }
     if (length($newpass1) < 7) {
 	&passwordchanger($r,
-			 '<span class="LC_error">'.
+			 '<span class="LC_warning">'.
 			 &mt('Passwords must be a minimum of 7 characters long.').'  '.
 			 &mt('Please try again.').'</span>',$caller,$mailtoken);
 	return 1;
@@ -1660,7 +1677,7 @@
     }
     if ($badpassword) {
 	# I can't figure out how to enter bad characters on my browser.
-	my $errormessage ='<span class="LC_error">'.
+	my $errormessage ='<span class="LC_warning">'.
            &mt('The password you entered contained illegal characters.').'<br />'.
            &mt('Valid characters are').(<<"ENDERROR");
 : space and <br />
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.111 loncom/interface/lonsyllabus.pm:1.112
--- loncom/interface/lonsyllabus.pm:1.111	Thu Jun 16 10:00:57 2011
+++ loncom/interface/lonsyllabus.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.111 2011/06/16 10:00:57 christianto Exp $
+# $Id: lonsyllabus.pm,v 1.112 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -436,7 +436,7 @@
             &Apache::lonhtmlcommon::htmlareaselectactive());
         }
     } else {
-        if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');}
+        if ($target ne 'tex') {$r->print('<p class="LC_info">');} else {$r->print('\par ');}
         $r->print(&mt('No syllabus information provided.'));
         if ($target ne 'tex') {$r->print('</p>');}
     }
Index: loncom/interface/lontrackstudent.pm
diff -u loncom/interface/lontrackstudent.pm:1.33 loncom/interface/lontrackstudent.pm:1.34
--- loncom/interface/lontrackstudent.pm:1.33	Wed Dec 21 21:25:40 2011
+++ loncom/interface/lontrackstudent.pm	Thu Oct  4 13:41:10 2012
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lontrackstudent.pm,v 1.33 2011/12/21 21:25:40 www Exp $
+# $Id: lontrackstudent.pm,v 1.34 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -251,11 +251,11 @@
     ##
     if (! -s $results_file) {
         # results file is empty, just let them know there is no data
-        $r->print('<h2>'.&mt('So far, no data has been returned for your request').'</h2>');
+        $r->print('<p class="LC_info">'.&mt('So far, no data has been returned for your request').'</p>');
         return -1;
     }
     if (! open(ACTIVITYDATA,$results_file)) {
-        $r->print('<h2>'.&mt('Unable to read results file.').'</h2>'.
+        $r->print('<p class="LC_error">'.&mt('Unable to read results file.').'</p>'.
                   '<p>'.
                   &mt('This is a serious error and has been logged.  '.
                       'You should contact your system administrator '.
@@ -615,8 +615,11 @@
             &get_data($r,\%prog_state,$navmap,
                       'student:'.$env{'form.selected_student'});
         } else {
-            $r->print('<h2>'.&mt('Unable to process for [_1]:[_2]',
-                                 $sname,$sdom).'</h2>');
+            $r->print(
+                '<p class="LC_error">'
+               .&mt('Unable to process for [_1]:[_2]',$sname,$sdom)
+               .'</p>'
+            );
         }
     } else {
         # For now, just show all the data instead of limiting it to one student
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.142 loncom/interface/lonuserutils.pm:1.143
--- loncom/interface/lonuserutils.pm:1.142	Tue Oct  2 18:08:12 2012
+++ loncom/interface/lonuserutils.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.142 2012/10/02 18:08:12 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.143 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3666,11 +3666,13 @@
         }
     }
     if (!$studentcount) {
+       my $msg = '';
         if ($crstype eq 'Community') {
-            $r->print(&mt('There are no members to drop.'));
+            $msg = &mt('There are no members to drop.');
         } else {
-            $r->print(&mt('There are no students to drop.'));
+            $msg = &mt('There are no students to drop.');
         }
+        $r->print('<p class="LC_info">'.$msg.'</p>');
         return;
     }
     my ($classgroups) = &Apache::loncoursedata::get_group_memberships(
@@ -4461,7 +4463,7 @@
             if (! defined($classlist)) {
                 $r->print('<form name="studentform" method="post" action="/adm/createuser" />'.
                           '<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'.
-                          &mt('There are no students with current/future access to the course.').
+                          '<p class="LC_info">'.&mt('There are no students with current/future access to the course.').'</p>'.
                           '</form>'."\n");
             } elsif (ref($classlist) eq 'HASH') {
                 # Remove the students we just added from the list of students.
@@ -4585,11 +4587,13 @@
               '<form name="studentform" method="post">'."\n");
     my $classlist = &Apache::loncoursedata::get_classlist();
     if (! defined($classlist)) {
+        my $msg = '';
         if ($crstype eq 'Community') {
-            $r->print(&mt('There are no members currently enrolled.')."\n");
+            $msg = &mt('There are no members currently enrolled.');
         } else {
-            $r->print(&mt('There are no students currently enrolled.')."\n");
+            $msg = &mt('There are no students currently enrolled.');
         }
+        $r->print('<p class="LC_info">'.$msg."</p>\n");
     } else {
         &show_drop_list($r,$classlist,'nosort',$permission,$crstype);
     }
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.236 loncom/interface/portfolio.pm:1.237
--- loncom/interface/portfolio.pm:1.236	Mon Jul 30 13:10:57 2012
+++ loncom/interface/portfolio.pm	Thu Oct  4 13:41:10 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.236 2012/07/30 13:10:57 bisitz Exp $
+# $Id: portfolio.pm,v 1.237 2012/10/04 13:41:10 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -650,7 +650,7 @@
         'symb'      => $env{'form.symb'},
         'mode'      => $env{'form.mode'}
     );
-    my $result = '<h3>'.&make_anchor($url,\%anchor_fields,&mt($message)).'</h3>';
+    my $result = '<p>'.&make_anchor($url,\%anchor_fields,&mt($message)).'</p>';
     return $result;
 }
 
@@ -670,7 +670,7 @@
             $r->print('<p>'.&mt('Delete [_1]?',&display_file(undef,\@files)).'</p>');
             &close_form($r,$url);
         } else {
-            $r->print("No file was checked to delete.<br />");
+            $r->print('<p class="LC_warning">'.&mt('No file was checked to delete.').'</p>');
             $r->print(&done(undef,$url));
         }
     }
@@ -2617,7 +2617,7 @@
         }
     }
     if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
-   	$r->print('<span class="LC_error">');
+   	$r->print('<span class="LC_warning">');
    	$r->print(&mt('No file was selected to upload.').' ');
 	$r->print(&mt('To upload a file, click <strong>Browse...</strong> and select a file, then click <strong>Upload</strong>.'));
 	$r->print('</span>');


More information about the LON-CAPA-cvs mailing list