[LON-CAPA-cvs] cvs: loncom /html/adm/helper course.initialization.helper

raeburn raeburn@source.lon-capa.org
Sun, 14 Mar 2010 15:25:47 -0000


raeburn		Sun Mar 14 15:25:47 2010 EDT

  Modified files:              
    /loncom/html/adm/helper	course.initialization.helper 
  Log:
  Bug 5984.
   - Update entry in nohist_courseids.db when course initialization helper is used to update course description.
  
  
Index: loncom/html/adm/helper/course.initialization.helper
diff -u loncom/html/adm/helper/course.initialization.helper:1.29 loncom/html/adm/helper/course.initialization.helper:1.30
--- loncom/html/adm/helper/course.initialization.helper:1.29	Thu Feb 11 01:30:52 2010
+++ loncom/html/adm/helper/course.initialization.helper	Sun Mar 14 15:25:47 2010
@@ -28,6 +28,16 @@
                                  $helper->{DATA}->{CRS});
             # Try to fix bug 1757
             Apache::lonnet::coursedescription($env{'request.course.id'});
+            if ($name eq 'description') {
+                my %crsinfo = &Apache::lonnet::courseiddump($crsdom,'.',1,'.','.',$crsnum,undef,undef,'.');
+                if (ref($crsinfo{$courseid}) eq 'HASH') {
+                    $crsinfo{$courseid}{'description'} = $val;
+                    my $crshome = &Apache::lonnet::homeserver($crsnum,$crsdom);
+                    unless ($crshome eq 'no_host') {
+                        my $putresult = &Apache::lonnet::courseidput($crsdom,\%crsinfo,$crshome,'notime');
+                    }
+                }
+            }
             return 1;
         } else {
             return 0;