--- loncom/interface/lonparmset.pm 2008/01/26 19:22:24 1.391 +++ loncom/interface/lonparmset.pm 2008/03/06 21:37:59 1.392 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.391 2008/01/26 19:22:24 www Exp $ +# $Id: lonparmset.pm,v 1.392 2008/03/06 21:37:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2026,6 +2026,8 @@ sub crsenv { my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; + my (%crsinfo,$chome); + # # Go through list of changes foreach (keys %env) { @@ -2120,19 +2122,37 @@ sub crsenv { my $put_result = &Apache::lonnet::put('environment', {$name=>$value},$dom,$crs); if ($put_result eq 'ok') { - $setoutput.=&mt('Set').' '.$name.' '.&mt('to').' '.$value.'.
'; + $setoutput.=&mt('Set').' '.$name.' '.&mt('to').' '; + if ($name =~ /^default_enrollment_(start|end)_date$/) { + $setoutput .= &Apache::lonlocal::locallocaltime($value); + } else { + $setoutput .= $value; + } + $setoutput .= '.
'; if ($name eq 'cloners') { &change_clone($value,\@oldcloner); } # Update environment and nohist_courseids.db - if ($name eq 'description' && defined($value)) { - my %crsinfo = - &Apache::lonnet::courseiddump($dom,'.',1,'.','.', + if ($name eq 'description' || $name eq 'cloners') { + if ($chome eq '') { + %crsinfo = + &Apache::lonnet::courseiddump($dom,'.',1,'.','.', $crs,undef,undef,'Course'); + $chome = &Apache::lonnet::homeserver($crs,$dom); + } + } + if ($name eq 'description' && defined($value)) { &Apache::lonnet::appenv('course.'.$env{'request.course.id'}.'.description' => $value); if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') { $crsinfo{$env{'request.course.id'}}{'description'} = $value; - my $chome = &Apache::lonnet::homeserver($crs,$dom); + my $putresult = + &Apache::lonnet::courseidput($dom,\%crsinfo, + $chome,'notime'); + } + } + if ($name eq 'cloners') { + if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') { + $crsinfo{$env{'request.course.id'}}{'cloners'} = $value; my $putresult = &Apache::lonnet::courseidput($dom,\%crsinfo, $chome,'notime'); @@ -2318,6 +2338,7 @@ Use * to allow unrestricted cloning in a 'texengine' => ''.&mt('Force all students in the course to use a specific math rendering engine.').'
'.&mt('(Valid options are [_1].)','"tth", "jsMath", "mimetex"').'', + ); my @Display_Order = ('url','description','courseid','cloners','grading', 'externalsyllabus', 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.