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

raeburn raeburn at source.lon-capa.org
Tue Feb 7 10:44:23 EST 2017


raeburn		Tue Feb  7 15:44:23 2017 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm 
  Log:
  - "Edit" link for syllabus and "Select Map" link for Top Level Map only shown
    in General Course Settings display if user has rights to modify course content.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.83 loncom/interface/courseprefs.pm:1.84
--- loncom/interface/courseprefs.pm:1.83	Sun Nov 13 15:16:40 2016
+++ loncom/interface/courseprefs.pm	Tue Feb  7 15:44:23 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.83 2016/11/13 15:16:40 raeburn Exp $
+# $Id: courseprefs.pm,v 1.84 2017/02/07 15:44:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2057,14 +2057,20 @@
     } else {
         $replace = &mt('To replace the standard title for a course role, enter a title, otherwise leave blank');
     }
+    my ($editmap,$editsyllabus);
+    unless ($noedit) {
+        $editmap = (' 'x2).
+                   '<a href="javascript:openbrowser'.
+                   "('display','url','sequence')\">".
+                   &mt('Select Map').'</a><br /><span class="LC_warning"> '.
+                   &mt('Modification may make assessment data inaccessible!').
+                   '</span>';
+        $editsyllabus = &mt('[_1]Edit[_2]','<a href="/public/'.$cdom.'/'.$cnum.'/syllabus?forceedit=1">',
+                            '</a>');  
+    }
     my %items = (
         'url' => {
-                   text => '<b>'.&mt($itemtext->{'url'}).'</b>'.(' 'x2).
-                           '<a href="javascript:openbrowser'.
-                           "('display','url','sequence')\">".
-                           &mt('Select Map').'</a><br /><span class="LC_warning"> '.
-                           &mt('Modification may make assessment data inaccessible!').
-                           '</span>',
+                   text => '<b>'.&mt($itemtext->{'url'}).'</b>'.$editmap,
                    input => 'textbox',
                    size  => '55',
                    advanced => 1
@@ -2109,8 +2115,7 @@
         'externalsyllabus' => {
                    text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />'.
                            &mt('(Syllabus type in use)').(' ' x2).
-                           &mt('[_1]Edit[_2]','<a href="/public/'.$cdom.'/'.$cnum.'/syllabus?forceedit=1">',
-                               '</a>'),
+                           $editsyllabus,
                         },
         'hidefromcat' => {
                    text => '<b>'.&mt($itemtext->{'hidefromcat'}).'</b><br />'.




More information about the LON-CAPA-cvs mailing list