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

raeburn raeburn@source.lon-capa.org
Wed, 22 Dec 2010 16:57:41 -0000


raeburn		Wed Dec 22 16:57:41 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	courseprefs.pm 
  Log:
  - Backport 1.35.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.28.2.4 loncom/interface/courseprefs.pm:1.28.2.5
--- loncom/interface/courseprefs.pm:1.28.2.4	Wed Dec 22 16:46:43 2010
+++ loncom/interface/courseprefs.pm	Wed Dec 22 16:57:41 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.28.2.4 2010/12/22 16:46:43 raeburn Exp $
+# $Id: courseprefs.pm,v 1.28.2.5 2010/12/22 16:57:41 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 =
@@ -346,9 +347,9 @@
                      help => 'Course_Environment',
                      header => [{col1 => 'Setting',
                                  col2 => 'Value'}],
-                     ordered => ['owner','co-owners','description','courseid',
-                                 'categories','hidefromcat','externalsyllabus',
-                                 'url','rolenames','cloners'],
+                     ordered => ['owner','co-owners','loncaparev','description',
+                                 'courseid','categories','hidefromcat',
+                                 'externalsyllabus','cloners','url','rolenames'],
                      itemtext => {
                                    'owner'            => $lt{'ownr'},
                                    'co-owners'        => $lt{'cown'},
@@ -360,6 +361,7 @@
                                    'externalsyllabus' => 'URL of Syllabus',
                                    'url'              => 'Top Level Map',
                                    'rolenames'        => $lt{'rept'},
+                                   'loncaparev'       => $lt{'lcrv'},
                                  },
                     },
         'localization' =>
@@ -712,6 +714,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} = '*';
@@ -1739,6 +1742,9 @@
                    input => 'textbox',
                    size  => '25',
                         },
+        'loncaparev' => {
+                   text => '<b>'.&mt($itemtext->{'loncaparev'}).'</b>',
+                        },
     );
     my $datatable;
     my $count = 0;
@@ -1872,7 +1878,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'};
@@ -1894,6 +1899,15 @@
                     $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});
         }