Diff for /loncom/homework/lonhomework.pm between versions 1.239 and 1.242

version 1.239, 2006/04/11 21:08:29 version 1.242, 2006/04/25 15:32:40
Line 234  sub check_slot_access { Line 234  sub check_slot_access {
     my ($status,$datemsg)=&check_access($id);      my ($status,$datemsg)=&check_access($id);
           
     my $useslots = &Apache::lonnet::EXT("resource.$id.useslots");      my $useslots = &Apache::lonnet::EXT("resource.$id.useslots");
     if ($useslots ne 'resource') {      if ($useslots ne 'resource' && $useslots ne 'sequence') {
  return ($status,$datemsg);   return ($status,$datemsg);
     }      }
   
Line 266  sub check_slot_access { Line 266  sub check_slot_access {
     my $slotstatus='NOT_IN_A_SLOT';      my $slotstatus='NOT_IN_A_SLOT';
     my ($returned_slot,$slot_name);      my ($returned_slot,$slot_name);
     foreach my $slot (@slots) {      foreach my $slot (@slots) {
    $slot =~ s/(^\s*|\s*$)//g;
  &Apache::lonxml::debug("getting $slot");   &Apache::lonxml::debug("getting $slot");
  my %slot=&Apache::lonnet::get_slot($slot);   my %slot=&Apache::lonnet::get_slot($slot);
  &Apache::lonhomework::showhash(%slot);   &Apache::lonhomework::showhash(%slot);
Line 623  sub handle_save_or_undo { Line 624  sub handle_save_or_undo {
 sub analyze_header {  sub analyze_header {
     my ($request) = @_;      my ($request) = @_;
     my $result =      my $result =
  &Apache::loncommon::start_page('Analyzing a problem',undef,   &Apache::loncommon::start_page('Analyzing a problem',undef);
        {'only_body' => ($env{'environment.remote'} ne 'off'),});  
     $result .=       $result .= 
  &Apache::lonxml::message_location().'   &Apache::lonxml::message_location().'
             <form name="lonhomework" method="POST" action="'.              <form name="lonhomework" method="POST" action="'.
Line 756  sub editxmlmode { Line 757  sub editxmlmode {
  if ($rows < 20) { $rows = 20; }   if ($rows < 20) { $rows = 20; }
  my $start_page =    my $start_page = 
     &Apache::loncommon::start_page("EditXML $file",      &Apache::loncommon::start_page("EditXML $file",
    &Apache::edit::js_change_detection(),     &Apache::edit::js_change_detection());
    {'only_body' =>  
  ($env{'environment.remote'} ne 'off')});  
   
  $result.=$start_page.   $result.=$start_page.
     &renderpage($request,$file,['no_output_web'],1).      &renderpage($request,$file,['no_output_web'],1).
Line 911  sub newproblem { Line 910  sub newproblem {
     $errormsg='<p><font color="red">'.&mt('You did not select a template.').'</font></p>'."\n";      $errormsg='<p><font color="red">'.&mt('You did not select a template.').'</font></p>'."\n";
  }   }
  my $instructions;   my $instructions;
  my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,   my $start_page = 
  ($env{'environment.remote'} ne 'off'));      &Apache::loncommon::start_page("Create New $extension");
  if ($templatelist) { $instructions=&mt(", select a template from the pull-down menu below.").'<br />'.&mt("Then");}   if ($templatelist) { $instructions=&mt(", select a template from the pull-down menu below.").'<br />'.&mt("Then");}
  my %lt=&Apache::lonlocal::texthash( 'create' => 'Creating a new',   my %lt=&Apache::lonlocal::texthash( 'create' => 'Creating a new',
   'resource' => 'resource',    'resource' => 'resource',
Line 923  sub newproblem { Line 922  sub newproblem {
   'Create' => 'Create',    'Create' => 'Create',
   'button' => 'button');    'button' => 'button');
  $request->print(<<ENDNEWPROBLEM);   $request->print(<<ENDNEWPROBLEM);
 $bodytag  $start_page
 <h1>$lt{'create'} $extension $lt{'resource'}</h1>  <h1>$lt{'create'} $extension $lt{'resource'}</h1>
 $errormsg  $errormsg
 $lt{'requested'} <tt>$shownurl</tt> $lt{'not exist'}.  $lt{'requested'} <tt>$shownurl</tt> $lt{'not exist'}.

Removed from v.1.239  
changed lines
  Added in v.1.242


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>