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

raeburn raeburn@source.lon-capa.org
Wed, 09 Sep 2009 18:52:04 -0000


raeburn		Wed Sep  9 18:52:04 2009 EDT

  Modified files:              
    /loncom/interface	lonpreferences.pm 
  Log:
  - Bug 6030.
     - Preference setting now uses value retrieved from environment.db in 
       display of current setting for "New posts cease to be identified as "New"?".
  - Check mark used following update of user preference now displayed for bothdiscussion display settings.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.170 loncom/interface/lonpreferences.pm:1.171
--- loncom/interface/lonpreferences.pm:1.170	Tue Sep  8 22:17:02 2009
+++ loncom/interface/lonpreferences.pm	Wed Sep  9 18:52:03 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.170 2009/09/08 22:17:02 bisitz Exp $
+# $Id: lonpreferences.pm,v 1.171 2009/09/09 18:52:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1608,7 +1608,7 @@
         }
     }
     if (defined($userenv{'discmarkread'})) {
-        unless ($userenv{'discdisplay'} eq '') { 
+        unless ($userenv{'discmarkread'} eq '') { 
             $discmark = $userenv{'discmarkread'};
         }
     }
@@ -1652,7 +1652,7 @@
         $currmark = $lt{'ondisp'};
         $newmark = 'onmark';
     }
-    
+
     $r->print(<<"END");
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_discussion" />
@@ -1701,11 +1701,11 @@
     if (defined($env{'form.discdisp'}) ) {
         my $newdisp  = $env{'form.newdisp'};
         if ($newdisp eq 'unread') {
-            $message .=&mt('In discussions: only new posts will be displayed.').'<br />';
+            $message .=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: only new posts will be displayed.')).'<br />';
             &Apache::lonnet::put('environment',{'discdisplay' => $newdisp});
             &Apache::lonnet::appenv({'environment.discdisplay' => $newdisp});
         } else {
-            $message .= &mt('In discussions: all posts will be displayed.').'<br />';
+            $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: all posts will be displayed.')).'<br />';
             &Apache::lonnet::del('environment',['discdisplay']);
             &Apache::lonnet::delenv('environment.discdisplay');
         }