--- loncom/homework/grades.pm 2019/03/06 15:45:29 1.761 +++ loncom/homework/grades.pm 2020/05/06 15:01:15 1.765 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.761 2019/03/06 15:45:29 raeburn Exp $ +# $Id: grades.pm,v 1.765 2020/05/06 15:01:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -655,7 +655,7 @@ sub canmodify { #can modify the requested section return 1; } else { - # can't modify the request section + # can't modify the requested section return 0; } } @@ -668,19 +668,19 @@ sub canview { my ($sec)=@_; if ($perm{'vgr'}) { if (!defined($perm{'vgr_section'})) { - # can modify whole class + # can view whole class return 1; } else { if ($sec eq $perm{'vgr_section'}) { - #can modify the requested section + #can view the requested section return 1; } else { - # can't modify the request section + # can't view the requested section return 0; } } } - #can't modify + #can't view return 0; } @@ -9794,7 +9794,7 @@ sub grading_menu { icon => 'grade_students.png', linktitle => 'Grade current resource for a selection of students.' }, - { linktext => 'Grade ungraded submissions.', + { linktext => 'Grade ungraded submissions', url => $url1b, permission => 'F', icon => 'ungrade_sub.png', @@ -10400,7 +10400,7 @@ ENDHEADER "\n".&mt("Username").":  ". "\n".&mt("Domain").": ". &Apache::loncommon::select_dom_form($env{'course.'.$env{'request.course.id'}.'.domain'},'udom'.$id).' '. - &Apache::loncommon::selectstudent_link('clickeranalysis','uname'.$id,'udom'.$id,0,$id); + &Apache::loncommon::selectstudent_link('clickeranalysis','uname'.$id,'udom'.$id,'',$id); $unknown_count++; } } @@ -10707,7 +10707,9 @@ sub startpage { unshift(@$crumbs,{href=>&href_symb_cmd($symb,'gradingmenu'),text=>"Grading"}); $args{'bread_crumbs'} = $crumbs; $r->print(&Apache::loncommon::start_page('Grading',$js,\%args)); - &Apache::lonquickgrades::startGradeScreen($r,($env{'form.symb'}?'probgrading':'grading')); + if ($env{'request.course.id'}) { + &Apache::lonquickgrades::startGradeScreen($r,($env{'form.symb'}?'probgrading':'grading')); + } } unless ($nodisplayflag) { $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)); @@ -10938,7 +10940,7 @@ sub handler { } if ($env{'form.inhibitmenu'}) { $request->print(&Apache::loncommon::end_page()); - } else { + } elsif ($env{'request.course.id'}) { &Apache::lonquickgrades::endGradeScreen($request); } &reset_caches();