Diff for /loncom/homework/lonhomework.pm between versions 1.37 and 1.39

version 1.37, 2001/02/13 18:42:06 version 1.39, 2001/02/19 20:35:21
Line 55  sub createmenu { Line 55  sub createmenu {
   my ($which,$request)=@_;    my ($which,$request)=@_;
   if ($which eq 'grade') {    if ($which eq 'grade') {
     $request->print('<script language="JavaScript">       $request->print('<script language="JavaScript"> 
           hwkmenu=window.open("/res/adm/pages/homeworkmenu.html","LONCAPAhomeworkmenu",            hwkmenu=window.open("/res/adm/pages/homeworkmenu.html","homeworkremote",
                  "height=350,width=150,menubar=no");                   "height=350,width=150,menubar=no");
           </script>');            </script>');
   }    }
Line 146  sub handler { Line 146  sub handler {
   #setup permissions    #setup permissions
   $Apache::lonhomework::browse= &Apache::lonnet::allowed('bre',$ENV{'request.filename'});    $Apache::lonhomework::browse= &Apache::lonnet::allowed('bre',$ENV{'request.filename'});
   $Apache::lonhomework::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'});    $Apache::lonhomework::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'});
   &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:");  
   
   #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()) { 
Line 158  sub handler { Line 157  sub handler {
   }    }
   
   &Apache::lonhomework::send_header($request);    &Apache::lonhomework::send_header($request);
     &Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:");
       
   foreach my $target (@targets) {    foreach my $target (@targets) {
     my $file=&Apache::lonnet::filelocation("",$request->uri);      my $file=&Apache::lonnet::filelocation("",$request->uri);
Line 178  sub handler { Line 178  sub handler {
     if ($target eq 'web') {      if ($target eq 'web') {
       if (&Apache::lonnet::symbread() eq '') {        if (&Apache::lonnet::symbread() eq '') {
  if ($ENV{'request.state'} eq "construct") {   if ($ENV{'request.state'} eq "construct") {
   $request->print("In construction space, submissions ignored<br>");    $request->print("In construction space, submissions ignored<br />");
  } else {   } else {
   $request->print("Browsing or <a href=\"/adm/ambiguous\">ambiguous</a> reference, submissions ignored<br>");    $request->print("Browsing or <a href=\"/adm/ambiguous\">ambiguous</a> reference, submissions ignored<br />");
  }   }
       }        }
       if ($Apache::lonhomework::viewgrades eq 'F') {&createmenu('grade',$request); }        if ($Apache::lonhomework::viewgrades eq 'F') {&createmenu('grade',$request); }
Line 190  sub handler { Line 190  sub handler {
       foreach $resultkey (sort keys %Apache::lonhomework::history) {        foreach $resultkey (sort keys %Apache::lonhomework::history) {
  &Apache::lonxml::debug("$resultkey ---- $Apache::lonhomework::history{$resultkey}");   &Apache::lonxml::debug("$resultkey ---- $Apache::lonhomework::history{$resultkey}");
       }        }
       &Apache::lonxml::debug("\n<br>restored values^</br>\n");        &Apache::lonxml::debug("\n<br />restored values^</br>\n");
     }      }
     my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm');      my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm');
     if ($default == -1) {      if ($default == -1) {
Line 209  sub handler { Line 209  sub handler {
       foreach $resultkey (sort keys %Apache::lonhomework::results) {        foreach $resultkey (sort keys %Apache::lonhomework::results) {
  &Apache::lonxml::debug("$resultkey ---- $Apache::lonhomework::results{$resultkey}");   &Apache::lonxml::debug("$resultkey ---- $Apache::lonhomework::results{$resultkey}");
       }        }
       &Apache::lonxml::debug("\n<br>storing values^</br>\n");        &Apache::lonxml::debug("\n<br />storing values^</br>\n");
     }      }
           
     my ($temp) = keys %Apache::lonhomework::results;      my ($temp) = keys %Apache::lonhomework::results;

Removed from v.1.37  
changed lines
  Added in v.1.39


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