--- loncom/interface/lonblockingmenu.pm 2020/10/01 18:59:09 1.14.2.3.2.3 +++ loncom/interface/lonblockingmenu.pm 2016/10/23 16:17:52 1.23 @@ -2,7 +2,7 @@ # Routines for configuring blocking of access to collaborative functions, # and specific resources during an exam # -# $Id: lonblockingmenu.pm,v 1.14.2.3.2.3 2020/10/01 18:59:09 raeburn Exp $ +# $Id: lonblockingmenu.pm,v 1.23 2016/10/23 16:17:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -527,7 +527,7 @@ sub handler { $r->print(&Apache::loncourserespicker::create_picker($navmap, 'examblock','resourceblocks',$crstype, \%blockedmaps,\%blockedresources, - $env{'form.block'},'','',undef,undef,$readonly)); + $env{'form.block'},'','',undef,$readonly)); } else { $r->print($errormsg); } @@ -578,7 +578,6 @@ sub handler { my %lt=&Apache::lonlocal::texthash ( 'cbds' => 'Blocking communication and/or content access during exams', 'prev' => "For the duration of an exam, or a timed quiz, students in this course can be prevented from:", - 'flow' => "For the duration of an exam, or a timed quiz, event-driven interruptions to a student's workflow can be suppressed:", 'blca' => "Blocks can potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA $lctype.", 'pobl' => "Portfolio blocking can impact a student's ability to complete assignments in courses besides your own. Please use this feature wisely.", 'actt' => "Action to take:", @@ -620,16 +619,9 @@ sub handler { '
  • '.&mt("displaying or posting to LON-CAPA discussion boards or live chat in the $lctype").'
  • '."\n". '
  • '.&mt('accessing content in LON-CAPA portfolios or blogs').'
  • '."\n". '
  • '.&mt("generating printouts of $lctype content").'
  • '. - '
  • '.&mt("displaying the LON-CAPA gradebook in the $lctype").'
  • '. - '
  • '.&mt("searching $lctype content by keyword").'
  • '. '
  • '.&mt("accessing $lctype content in specified folders or resources").'
  • '. '
  • '.&mt("changing user's own password").'
  • '. ''. - $lt{'flow'}. - ''. '

    '.$lt{'blca'}.'
    '.$lt{'pobl'}.'

    ' ); } @@ -666,19 +658,20 @@ END &Apache::loncourserespicker::get_navmap_object($crstype,'examblock'); # --------------------------------------------- Interface for adding a new block - unless ($readonly) { + if ($readonly) { + if (!$blockcount) { + $r->print($lt{'ncbc'}.'
    '); + } + } else { &display_addblocker_table($r,$blockcount,\%ltext,\%intervals, $navmap,$errormsg); if ($blockcount > 0) { $r->print(''); } } + # ------------------------------------------------ Interface for existing blocks - if (!$blockcount) { - if ($readonly) { - $r->print($lt{'ncbc'}.'
    '); - } - } else { + if ($blockcount > 0) { &display_blocker_status($r,\%records,\%ltext,\%intervals, $navmap,$errormsg,$blockcount,$readonly); } @@ -885,24 +878,6 @@ sub blockstore { &escape($env{'form.title_'.$key})).'
    '; } } - if ($blocktypes->{'alert'} eq 'on') { - ($status,$needsrelease) = &check_release_required('alert',$chomemajor,$chomeminor); - if ($status eq 'fail') { - $blocktypes->{'alert'} = 'off'; - $output .= '

    '. - &mt('Message Alert blocking not allowed for [_1]', - &escape($env{'form.title_'.$key})).'
    '; - } - } - if ($blocktypes->{'reinit'} eq 'on') { - ($status,$needsrelease) = &check_release_required('reinit',$chomemajor,$chomeminor); - if ($status eq 'fail') { - $blocktypes->{'reinit'} = 'off'; - $output .= '

    '. - &mt('Course Re-initialization blocking not allowed for [_1]', - &escape($env{'form.title_'.$key})).'
    '; - } - } } if ($blockdocs) { ($status,$needsrelease) = &check_release_required('docs',$chomemajor,$chomeminor); @@ -1658,12 +1633,8 @@ sub blocktype_text { 'docs' => 'Content', 'printout' => 'Printouts', 'passwd' => 'Change Password', - 'grades' => 'Gradebook', - 'search' => 'Content Search', - 'alert' => 'Critical Alert', - 'reinit' => 'Course Re-init', ); - my $typeorder = ['com','chat','boards','port','groups','blogs','printout','docs','grades','search','alert','reinit','passwd']; + my $typeorder = ['com','chat','boards','port','groups','blogs','printout','docs','passwd']; return ($typeorder,\%types); }