Diff for /loncom/homework/lonhomework.pm between versions 1.349.2.2 and 1.351

version 1.349.2.2, 2015/04/14 21:35:56 version 1.351, 2015/04/16 10:13:29
Line 1021  sub editxmlmode { Line 1021  sub editxmlmode {
  unless ($env{'environment.nocodemirror'}) {   unless ($env{'environment.nocodemirror'}) {
  # dropdown menues   # dropdown menues
     $result .= '<ol class="LC_primary_menu LC_floatleft">'.      $result .= '<ol class="LC_primary_menu LC_floatleft">'.
     &Apache::lonmenu::create_submenu("#", "", &mt("Insert Menu"), &Apache::structuretags::insert_menu_datastructure(),"").'</ol>';      &Apache::lonmenu::create_submenu("#", "", &mt("Templates"), 
                   &Apache::structuretags::insert_menu_datastructure(),
                   "").'</ol>';
  }   }
     $result .= '<ol class="LC_primary_menu LC_floatleft">'.      $result .= '<ol class="LC_primary_menu LC_floatleft">';
     Apache::lonmenu::create_submenu("#", "", &mt("Help"), &Apache::structuretags::helpmenu_datastructure(),"").'</ol>';  
     $result.="</div>";      $result .= Apache::lonmenu::create_submenu("#", "", 
           &mt("Help") . ' <img src="/adm/help/help.png" alt="' . &mt("Help") .
           '" style="vertical-align:text-bottom; height: auto; margin:0; "/>', 
           &Apache::structuretags::helpmenu_datastructure(),"");
   
       $result.="</ol></div>";
                     
          $result.='<hr style="clear:both;visibility:hidden" /></div></div>'.&Apache::lonxml::message_location().           $result.='<hr style="clear:both;visibility:hidden" /></div></div>'.&Apache::lonxml::message_location().
                   &Apache::loncommon::xmleditor_js().                    &Apache::loncommon::xmleditor_js().
Line 1331  sub update_construct_style { Line 1338  sub update_construct_style {
     }      }
 }  }
   
 # Sets timer to zero for the entire folder containing the current resource for the  
 # current user.  
 sub zero_timer {  
     my $symb = shift;  
     my $first_access = &Apache::lonnet::get_first_access("map",$symb);  
     my $done_time = time() - $first_access;  
     &Apache::lonparmset::storeparm_by_symb($symb,"0_interval","2",$done_time,  
             "date_interval",$env{'user.name'},$env{'user.domain'},,'',);  
 }  
   
   
 sub handler {  sub handler {
     #my $t0 = [&gettimeofday()];      #my $t0 = [&gettimeofday()];
     my $request=$_[0];      my $request=$_[0];
   
     my ($symb) = &Apache::lonnet::whichuser();  
   
     # Set the event timer to zero if the "done button" was clicked.  The button is   
     # part of the doneButton form created in lonmenu.pm  
     if ($env{"form.done"} eq "true") {  
         &zero_timer($symb);  
         $env{"form.done"} = "";  
     }  
   
     $Apache::lonxml::request=$request;      $Apache::lonxml::request=$request;
     $Apache::lonxml::debug=$env{'user.debug'};      $Apache::lonxml::debug=$env{'user.debug'};
     $env{'request.uri'}=$request->uri;      $env{'request.uri'}=$request->uri;
Line 1363  sub handler { Line 1350  sub handler {
     my $file=&Apache::lonnet::filelocation("",$request->uri);      my $file=&Apache::lonnet::filelocation("",$request->uri);
   
     #check if we know where we are      #check if we know where we are
     if ($env{'request.course.fn'} && !&Apache::lonnet::symbread()) {       if ($env{'request.course.fn'} && !&Apache::lonnet::symbread('','',1,1)) {
  # if we are browsing we might not be able to know where we are   # if we are browsing we might not be able to know where we are
  if ($Apache::lonhomework::browse ne 'F' &&    if ($Apache::lonhomework::browse ne 'F' && 
     $env{'request.state'} ne "construct") {      $env{'request.state'} ne "construct") {
Line 1379  sub handler { Line 1366  sub handler {
     }      }
     &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:$Apache::lonhomework::modifygrades:$Apache::lonhomework::queuegrade");      &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:$Apache::lonhomework::modifygrades:$Apache::lonhomework::queuegrade");
     &Apache::lonxml::debug("Problem Mode ".$env{'form.problemmode'});      &Apache::lonxml::debug("Problem Mode ".$env{'form.problemmode'});
       my ($symb) = &Apache::lonnet::whichuser();
     &Apache::lonxml::debug('symb is '.$symb);      &Apache::lonxml::debug('symb is '.$symb);
     if ($env{'request.state'} eq "construct") {      if ($env{'request.state'} eq "construct") {
  if ( -e $file ) {   if ( -e $file ) {

Removed from v.1.349.2.2  
changed lines
  Added in v.1.351


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