Diff for /loncom/homework/lonhomework.pm between versions 1.178.2.2 and 1.179

version 1.178.2.2, 2004/09/29 06:50:31 version 1.179, 2004/09/18 17:29:29
Line 52  use Apache::Constants qw(:common); Line 52  use Apache::Constants qw(:common);
 use HTML::Entities();  use HTML::Entities();
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonlocal;  use Apache::lonlocal;
 #use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
   
 BEGIN {  BEGIN {
     &Apache::lonxml::register_insert();      &Apache::lonxml::register_insert();
Line 292  sub check_access { Line 292  sub check_access {
     $status = 'CANNOT_ANSWER';      $status = 'CANNOT_ANSWER';
  }   }
     }      }
     if ($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER') {      if ($status eq 'CAN_ANSWER') {
  my $interval=&Apache::lonnet::EXT("resource.$id.interval");   my $interval=&Apache::lonnet::EXT("resource.$id.interval");
  &Apache::lonxml::debug("looking for interval $interval");   &Apache::lonxml::debug("looking for interval $interval");
  if ($interval) {   if ($interval) {
Line 453  sub analyze_header { Line 453  sub analyze_header {
             <head><title>'.&mt("Analyzing a problem").'</title></head>              <head><title>'.&mt("Analyzing a problem").'</title></head>
             <body bgcolor="#FFFFFF">'.&Apache::lonxml::message_location().'              <body bgcolor="#FFFFFF">'.&Apache::lonxml::message_location().'
             <form name="lonhomework" method="POST" action="'.              <form name="lonhomework" method="POST" action="'.
     &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">      &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'.
       &Apache::structuretags::remember_problem_state().'
             <input type="submit" name="problemmode" value="'.&mt("EditXML").'" />              <input type="submit" name="problemmode" value="'.&mt("EditXML").'" />
             <input type="submit" name="problemmode" value="'.&mt('Edit').'" />              <input type="submit" name="problemmode" value="'.&mt('Edit').'" />
             <hr />              <hr />
Line 573  sub editxmlmode { Line 574  sub editxmlmode {
  $result.='<html><body bgcolor="#FFFFFF">'.   $result.='<html><body bgcolor="#FFFFFF">'.
     &Apache::lonxml::message_location().'      &Apache::lonxml::message_location().'
             <form name="lonhomework" method="POST" action="'.              <form name="lonhomework" method="POST" action="'.
     &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">      &HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'.
       &Apache::structuretags::remember_problem_state().'
             <input type="hidden" name="problemmode" value="'.&mt('EditXML').'" />              <input type="hidden" name="problemmode" value="'.&mt('EditXML').'" />
             <input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" />              <input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" />
             <input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />              <input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />
Line 753  sub handler { Line 755  sub handler {
     if (&setupheader($request)) { return OK; }      if (&setupheader($request)) { return OK; }
     $ENV{'request.uri'}=$request->uri;      $ENV{'request.uri'}=$request->uri;
   
     &setuppermissions();      #setup permissions
       $Apache::lonhomework::browse= &Apache::lonnet::allowed('bre',$ENV{'request.filename'});
       $Apache::lonhomework::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'});
     &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:");      &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:");
     # some times multiple problemmodes are submitted, need to select      # some times multiple problemmodes are submitted, need to select
     # the last one      # the last one

Removed from v.1.178.2.2  
changed lines
  Added in v.1.179


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