Diff for /loncom/homework/lonhomework.pm between versions 1.268 and 1.272

version 1.268, 2007/07/23 23:30:47 version 1.272, 2007/08/24 22:58:18
Line 188  sub proctor_checked_in { Line 188  sub proctor_checked_in {
     return 0;      return 0;
 }  }
   
 $Apache::lonxml::browse='';  
 sub check_ip_acc {  sub check_ip_acc {
     my ($acc)=@_;      my ($acc)=@_;
     &Apache::lonxml::debug("acc is $acc");      &Apache::lonxml::debug("acc is $acc");
Line 196  sub check_ip_acc { Line 195  sub check_ip_acc {
  return 1;   return 1;
     }      }
     my $allowed=0;      my $allowed=0;
     my $ip=$ENV{'REMOTE_ADDR'};      my $ip=$env{'request.host'} || $ENV{'REMOTE_ADDR'};
   
     my $name;      my $name;
     foreach my $pattern (split(',',$acc)) {      foreach my $pattern (split(',',$acc)) {
  $pattern =~ s/^\s*//;   $pattern =~ s/^\s*//;
Line 861  sub editxmlmode { Line 861  sub editxmlmode {
  if ($cols > 80) { $cols = 80; }   if ($cols > 80) { $cols = 80; }
  if ($cols < 70) { $cols = 70; }   if ($cols < 70) { $cols = 70; }
  if ($rows < 20) { $rows = 20; }   if ($rows < 20) { $rows = 20; }
    my $js =
       &Apache::edit::js_change_detection(). 
       &Apache::loncommon::resize_textarea_js();
    my $only_body =  ($env{'environment.remote'} eq 'off')? 0 : 1;
  my $start_page =    my $start_page = 
     &Apache::loncommon::start_page(&mt("EditXML [_1]",$file),      &Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js,
    &Apache::edit::js_change_detection(),     {'no_auto_mt_title' => 1,
    {'no_auto_mt_title' => 1,});      'only_body'        => $only_body,
       'add_entries'      => {
    'onresize' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
    'onload'   => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
       }});
   
  $result.=$start_page.   $result.=$start_page.
     &renderpage($request,$file,['no_output_web'],1).      &renderpage($request,$file,['no_output_web'],1).
Line 881  sub editxmlmode { Line 889  sub editxmlmode {
             <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />              <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />
             <hr />              <hr />
             ' . $xml_help . '              ' . $xml_help . '
             <textarea '.&Apache::edit::element_change_detection().' style="width:100%" rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'.              <textarea '.&Apache::edit::element_change_detection().
     &HTML::Entities::encode($problem,'<>&"').'</textarea><br />                ' rows="'.$rows.'" cols="'.$cols.'" style="width:100%" '.
             <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" />        ' name="editxmltext" id="LC_editxmltext">'.
             <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />        &HTML::Entities::encode($problem,'<>&"').'</textarea>
               <div id="LC_aftertextarea">
                   <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" />
                   <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />
               </div>
             </form>'.&Apache::loncommon::end_page();              </form>'.&Apache::loncommon::end_page();
  &Apache::lonxml::add_messages(\$result);   &Apache::lonxml::add_messages(\$result);
  $request->print($result);   $request->print($result);

Removed from v.1.268  
changed lines
  Added in v.1.272


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