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

raeburn raeburn@source.lon-capa.org
Tue, 21 Dec 2010 00:26:56 -0000


raeburn		Tue Dec 21 00:26:56 2010 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm 
  Log:
  - Required LON-CAPA version displayed in "General course settings".
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.34 loncom/interface/courseprefs.pm:1.35
--- loncom/interface/courseprefs.pm:1.34	Sat Nov 27 20:51:26 2010
+++ loncom/interface/courseprefs.pm	Tue Dec 21 00:26:56 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.34 2010/11/27 20:51:26 www Exp $
+# $Id: courseprefs.pm,v 1.35 2010/12/21 00:26:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -320,6 +320,7 @@
                 seme => 'Send message to student when clicking Done on Tasks',
               );
     }
+    $lt{'lcrv'} = 'Required LON-CAPA version';
     &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/courseprefs',
         text=>$lt{'conf'}});
     my $breadcrumbs =
@@ -344,9 +345,9 @@
         'courseinfo' =>
                    { text => $lt{'gens'},
                      help => 'Course_Environment',
-                     ordered => ['owner','co-owners','description','courseid',
-                                 'categories','hidefromcat','externalsyllabus',
-                                 'cloners','url','rolenames'],
+                     ordered => ['owner','co-owners','loncaparev','description',
+                                 'courseid','categories','hidefromcat',
+                                 'externalsyllabus','cloners','url','rolenames'],
                      itemtext => {
                                    'owner'            => $lt{'ownr'},
                                    'co-owners'        => $lt{'cown'},
@@ -358,6 +359,7 @@
                                    'externalsyllabus' => 'URL of Syllabus',
                                    'url'              => 'Top Level Map',
                                    'rolenames'        => $lt{'rept'},
+                                   'loncaparev'       => $lt{'lcrv'},
                                  },
                     },
         'localization' =>
@@ -679,6 +681,7 @@
                     }
                 } else {
                     foreach my $entry (@ordered) {
+                        next if (($entry eq 'loncaparev') || ($entry eq 'owner'));
                         if ($entry eq 'cloners') {
                             if ($env{'form.cloners_all'}) {
                                 $newvalues{$entry} = '*';
@@ -1709,6 +1712,9 @@
                    input => 'textbox',
                    size  => '25',
                         },
+        'loncaparev' => {
+                   text => '<b>'.&mt($itemtext->{'loncaparev'}).'</b>',
+                        },
     );
     my $datatable;
     my $count = 0;
@@ -1846,7 +1852,6 @@
             } else {
                 $owner = &mt('None specified');
             }
-            my $domdesc = &Apache::lonnet::domain($cdom,'description');
             $datatable .= $owner;
         } elsif ($item eq 'co-owners') {
             my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -1868,6 +1873,16 @@
                     $datatable .= &manage_coownership($cnum,$cdom,@currcoown);
                 }
             }
+        } elsif ($item eq 'loncaparev') {
+            my $loncaparev = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'};
+            my $showreqd;
+            if ($loncaparev) {
+                $showreqd = &mt('[_1] or newer',$loncaparev);
+            } else {
+                $showreqd = &mt('No specific version required');
+            }
+            $datatable .= $showreqd;
+
         } else {
             $datatable .= &Apache::lonhtmlcommon::textbox($item,$settings->{$item},$items{$item}{size});
         }