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

www www@source.lon-capa.org
Sat, 21 Nov 2009 22:36:23 -0000


www		Sat Nov 21 22:36:23 2009 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm lonhtmlcommon.pm 
  Log:
  Link to Course Preferences
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.278 loncom/interface/lonfeedback.pm:1.279
--- loncom/interface/lonfeedback.pm:1.278	Wed Nov  4 17:45:49 2009
+++ loncom/interface/lonfeedback.pm	Sat Nov 21 22:36:23 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.278 2009/11/04 17:45:49 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.279 2009/11/21 22:36:23 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1484,7 +1484,6 @@
   }
 
   my %lt = &Apache::lonlocal::texthash(
-            'plch' => 'Please check at least one of the following feedback types:',
             'myqu' => 'My question/comment/feedback:',
             'title' => 'Title',
             'reta' => 'Retained attachments',
@@ -1700,7 +1699,6 @@
 END
   }
   $r->print(<<END);
-$lt{'plch'}
 $options<hr />
 $quote
 <p>$lt{'myqu'}</p>
@@ -2645,12 +2643,12 @@
     }
     if ($msgoptions) {
         $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/res/adm/pages/com.png').'" />'
-                   .' '.&mt('Send Feedback').'</h2>'
+                   .' '.&mt('Send Feedback').'</h2><p>'.&Apache::lonhtmlcommon::coursepreflink(&mt('Feedback Settings'),'feedback').'</p>'
                    .$msgoptions;
     }
     if ($discussoptions) { 
 	$discussoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" />'
-                        .' '.&mt('Discussion Contributions').'</h2>'
+                        .' '.&mt('Discussion Contributions').'</h2><p>'.&Apache::lonhtmlcommon::coursepreflink(&mt('Discussion Settings'),'discussion').'</p>'
                         .$discussoptions;
     }
     return $msgoptions.$discussoptions;
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.246 loncom/interface/lonhtmlcommon.pm:1.247
--- loncom/interface/lonhtmlcommon.pm:1.246	Thu Nov 19 10:25:02 2009
+++ loncom/interface/lonhtmlcommon.pm	Sat Nov 21 22:36:23 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.246 2009/11/19 10:25:02 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.247 2009/11/21 22:36:23 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -62,6 +62,16 @@
 use Apache::lonnet;
 use LONCAPA;
 
+
+sub coursepreflink {
+   my ($text,$category)=@_;
+   if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
+      return '<a href="/adm/courseprefs?phase=display&actions='.$category.'">'.$text.'</a>';
+   } else {
+      return '';
+   }
+}
+
 ##############################################
 ##############################################