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

raeburn raeburn at source.lon-capa.org
Sat May 11 21:03:12 EDT 2013


raeburn		Sun May 12 01:03:12 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	courseprefs.pm 
  Log:
  - For 2.11
    - Backport 1.55
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.49.2.5 loncom/interface/courseprefs.pm:1.49.2.6
--- loncom/interface/courseprefs.pm:1.49.2.5	Wed Jan  9 19:35:42 2013
+++ loncom/interface/courseprefs.pm	Sun May 12 01:03:11 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.49.2.5 2013/01/09 19:35:42 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49.2.6 2013/05/12 01:03:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -300,6 +300,7 @@
                 gens => 'General course settings',
                 idnu => 'Course ID or number',
                 desc => 'Course Description',
+                cred => 'Student credits',
                 ownr => 'Course Owner',
                 cown => 'Course Co-owners',
                 catg => 'Categorize course',
@@ -422,6 +423,7 @@
                                  col2 => $lt{'stuv'}}],
                      ordered => ['default_enrollment_start_date',
                                  'default_enrollment_end_date',
+                                 'defaultcredits',
                                  'nothideprivileged','student_classlist_view',
                                  'student_classlist_opt_in','student_classlist_portfiles'],
                      itemtext => {
@@ -431,6 +433,7 @@
                          student_classlist_view        => $lt{'stuv'},
                          student_classlist_opt_in      => $lt{'stul'},
                          student_classlist_portfiles   => 'Include link to accessible portfolio files',
+                         defaultcredits                => $lt{'cred'},
                                   },
                    },
         'appearance' =>
@@ -683,6 +686,11 @@
                                 ($entry eq 'owner'));
                         push(@ordered,$entry);
                     }
+                } elsif ($action eq 'classlists') {
+                    foreach my $entry (@{$item->{'ordered'}}) {
+                        next if ($entry eq 'defaultcredits');
+                        push(@ordered,$entry);
+                    }
                 } else {
                     @ordered = @{$item->{'ordered'}};
                 }
@@ -1781,13 +1789,13 @@
                            &mt('Modification may make assessment data inaccessible!').
                            '</span>',
                    input => 'textbox',
-                   size  => '40',
+                   size  => '55',
                    advanced => 1
                  },
         'description'  => { 
                    text => '<b>'.&mt($itemtext->{'description'}).'</b>',
                    input => 'textbox',
-                   size  => '25',
+                   size  => '55',
                           },
         'owner'        => {
                    text => '<b>'.&mt($itemtext->{'owner'}).'</b>',
@@ -1834,6 +1842,9 @@
         'loncaparev' => {
                    text => '<b>'.&mt($itemtext->{'loncaparev'}).'</b>',
                         },
+        'defaultcredits' => {
+                   text => '<b>'.&mt($itemtext->{'defaultcredits'}).'</b>',
+                        },
     );
     my $datatable;
     my $count = 0;
@@ -3288,6 +3299,9 @@
     if ($position eq 'top') {
         @ordered = ('default_enrollment_start_date',
                     'default_enrollment_end_date');
+        if ($crstype eq 'Course') {
+            push(@ordered,'defaultcredits');
+        }
     } elsif ($position eq 'middle') {
         @ordered = ('nothideprivileged');
     } else {
@@ -3721,7 +3735,16 @@
             } else {
                 $datatable .= &item_table_row_start($items->{$item}{text},$count);
             }
-            if ($item eq 'nothideprivileged') {
+            if ($item eq 'defaultcredits') {
+                my $defaultcredits = $env{'course.'.$env{'request.course.id'}.'.internal.defaultcredits'};
+                my $showcredits;
+                if ($defaultcredits ne '') {
+                    $showcredits = &mt('Default is [quant,_1,credit]',$defaultcredits);
+                } else {
+                    $showcredits = &mt('No default set');
+                }
+                $datatable .= $showcredits;
+            } elsif ($item eq 'nothideprivileged') {
                 $datatable .= &nothidepriv_row($cdom,$item,$settings,$crstype);
             } elsif ($item eq 'print_header_format') {
                 $datatable .= &print_hdrfmt_row($item,$settings);




More information about the LON-CAPA-cvs mailing list