Diff for /loncom/interface/lonblockingmenu.pm between versions 1.22 and 1.29

version 1.22, 2016/10/23 14:35:32 version 1.29, 2021/01/02 21:07:36
Line 116  Outputs: 2 Line 116  Outputs: 2
     $readonly - true if modification of blocking events is prohibited.      $readonly - true if modification of blocking events is prohibited.
   
     $allowed  - true if blocking events information can be shown.      $allowed  - true if blocking events information can be shown.
    
   
 =item &get_timed_items()  =item &get_timed_items()
   
Line 252  Inputs: 8 Line 252  Inputs: 8
       - $blockcount - number of existing blocking events in course        - $blockcount - number of existing blocking events in course
   
       - $readonly - if true, modification not allowed.        - $readonly - if true, modification not allowed.
    
   
 Output: None  Output: None
   
Line 345  Outputs: 1 - $intervalform - web form el Line 345  Outputs: 1 - $intervalform - web form el
 =item &interval_details()  =item &interval_details()
   
 Creates name/scope of current interval and expandable/collapsible  Creates name/scope of current interval and expandable/collapsible
 showing which interval parameters apply to the current folder/resource   showing which interval parameters apply to the current folder/resource
   
 Inputs: 6  Inputs: 6
   
Line 362  Inputs: 6 Line 362  Inputs: 6
     - $parmcount - unique ID for current element.      - $parmcount - unique ID for current element.
   
   
 Outputs: 2   Outputs: 2
   
    - $itemname - name/scope of interval (timer) parameter     - $itemname - name/scope of interval (timer) parameter
   
Line 435  containing details about item with timed Line 435  containing details about item with timed
 Inputs: none  Inputs: none
   
 Output: 1 Javascript (with <script></script> tags) for functions used to:  Output: 1 Javascript (with <script></script> tags) for functions used to:
           toggle visibility of unordered list for display of detailed             toggle visibility of unordered list for display of detailed
           information about intervals.            information about intervals.
    
 =back    =back
   
 =cut  =cut
   
Line 527  sub handler { Line 527  sub handler {
             $r->print(&Apache::loncourserespicker::create_picker($navmap,              $r->print(&Apache::loncourserespicker::create_picker($navmap,
                                      'examblock','resourceblocks',$crstype,                                       'examblock','resourceblocks',$crstype,
                                      \%blockedmaps,\%blockedresources,                                       \%blockedmaps,\%blockedresources,
                                      $env{'form.block'},'','',undef,$readonly));                                       $env{'form.block'},'','',undef,undef,$readonly));
         } else {          } else {
             $r->print($errormsg);              $r->print($errormsg);
         }          }
Line 578  sub handler { Line 578  sub handler {
     my %lt=&Apache::lonlocal::texthash (      my %lt=&Apache::lonlocal::texthash (
             'cbds' => 'Blocking communication and/or content access during exams',              '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:",              '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.",              '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.",              '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:",              'actt' => "Action to take:",
Line 617  sub handler { Line 618  sub handler {
             '<ul>'."\n".              '<ul>'."\n".
             '<li>'.&mt("displaying LON-CAPA messages sent by other $usertype in the $lctype").'</li>'."\n".              '<li>'.&mt("displaying LON-CAPA messages sent by other $usertype in the $lctype").'</li>'."\n".
             '<li>'.&mt("displaying or posting to LON-CAPA discussion boards or live chat in the $lctype").'</li>'."\n".              '<li>'.&mt("displaying or posting to LON-CAPA discussion boards or live chat in the $lctype").'</li>'."\n".
             '<li>'.&mt('accessing content in LON-CAPA portfolios or blogs').'</li>'."\n".              '<li>'.&mt('accessing content in LON-CAPA portfolios, blogs, or user information pages').'</li>'."\n".
             '<li>'.&mt("generating printouts of $lctype content").'</li>'.              '<li>'.&mt("generating printouts of $lctype content").'</li>'.
               '<li>'.&mt("displaying the LON-CAPA gradebook in the $lctype").'</li>'.
               '<li>'.&mt("searching $lctype content by keyword").'</li>'.  
             '<li>'.&mt("accessing $lctype content in specified folders or resources").'</li>'.              '<li>'.&mt("accessing $lctype content in specified folders or resources").'</li>'.
             '<li>'.&mt("changing user's own password").'</li>'.              '<li>'.&mt("changing user's own password").'</li>'.
             '</ul>'.              '</ul>'.
               $lt{'flow'}.
               '<ul>'."\n".
               '<li>'.&mt("re-initialization of cached course structure, when a change has been made to $lctype content by a Coordinator").'</li>'.
               '<li>'.&mt('display of Critical Messages when navigation arrows used to move to the adjacent resource').'</li>'.
               '</ul>'.
             '<p class="LC_warning">'.$lt{'blca'}.'<br />'.$lt{'pobl'}.'</p>'              '<p class="LC_warning">'.$lt{'blca'}.'<br />'.$lt{'pobl'}.'</p>'
         );          );
     }      }
   
 # ------------------------ Choose between modifying existing block or adding new  # ------------------------ Choose between modifying existing block or adding new
     $r->print('<form name="blockform" method="post" action="/adm/setblock?action=store">');      $r->print('<form name="blockform" method="post" action="/adm/setblock?action=store">');
       
     unless ($readonly) {       unless ($readonly) {
         if ($blockcount > 0) {          if ($blockcount > 0) {
             $r->print(<<"END");              $r->print(<<"END");
 <div class="LC_left_float">  <div class="LC_left_float">
Line 658  END Line 666  END
         &Apache::loncourserespicker::get_navmap_object($crstype,'examblock');          &Apache::loncourserespicker::get_navmap_object($crstype,'examblock');
   
 # --------------------------------------------- Interface for adding a new block  # --------------------------------------------- Interface for adding a new block
     if ($readonly) {      unless ($readonly) {
         if (!$blockcount) {  
             $r->print($lt{'ncbc'}.'<br />');  
         }  
     } else {  
         &display_addblocker_table($r,$blockcount,\%ltext,\%intervals,          &display_addblocker_table($r,$blockcount,\%ltext,\%intervals,
                                   $navmap,$errormsg);                                    $navmap,$errormsg);
         if ($blockcount > 0) {          if ($blockcount > 0) {
             $r->print('</div>');              $r->print('</div>');
         }          }
     }      }
   
 # ------------------------------------------------ Interface for existing blocks  # ------------------------------------------------ Interface for existing blocks
     if ($blockcount > 0) {      if (!$blockcount) {
           if ($readonly) {
               $r->print($lt{'ncbc'}.'<br />');
           }
       } else {
         &display_blocker_status($r,\%records,\%ltext,\%intervals,          &display_blocker_status($r,\%records,\%ltext,\%intervals,
                                 $navmap,$errormsg,$blockcount,$readonly);                                  $navmap,$errormsg,$blockcount,$readonly);
     }      }
Line 878  sub blockstore { Line 885  sub blockstore {
                                            &escape($env{'form.title_'.$key})).'<br />';                                             &escape($env{'form.title_'.$key})).'<br />';
                         }                          }
                     }                      }
                       if ($blocktypes->{'alert'} eq 'on') {
                           ($status,$needsrelease) = &check_release_required('alert',$chomemajor,$chomeminor);
                           if ($status eq 'fail') {
                               $blocktypes->{'alert'} = 'off';
                               $output .= '<p class="LC_warning">'.
                                          &mt('Message Alert blocking not allowed for [_1]',
                                              &escape($env{'form.title_'.$key})).'<br />';
                           }
                       }
                       if ($blocktypes->{'reinit'} eq 'on') {
                           ($status,$needsrelease) = &check_release_required('reinit',$chomemajor,$chomeminor);
                           if ($status eq 'fail') {
                               $blocktypes->{'reinit'} = 'off';
                               $output .= '<p class="LC_warning">'.
                                          &mt('Course Re-initialization blocking not allowed for [_1]',
                                              &escape($env{'form.title_'.$key})).'<br />';
                           }
                       }
                 }                  }
                 if ($blockdocs) {                  if ($blockdocs) {
                     ($status,$needsrelease) = &check_release_required('docs',$chomemajor,$chomeminor);                      ($status,$needsrelease) = &check_release_required('docs',$chomemajor,$chomeminor);
Line 1437  sub create_interval_form { Line 1462  sub create_interval_form {
                                 if (ref($resobj)) {                                  if (ref($resobj)) {
                                     $title = $resobj->compTitle();                                      $title = $resobj->compTitle();
                                 }                                  }
                                 if ($title eq '') {                                                        if ($title eq '') {
                                     $title = &Apache::lonnet::gettitle($resource);                                      $title = &Apache::lonnet::gettitle($resource);
                                 }                                  }
                                 $hierarchy = &show_timer_path($type,$resource,$navmap);                                  $hierarchy = &show_timer_path($type,$resource,$navmap);
Line 1630  sub blocktype_text { Line 1655  sub blocktype_text {
         'port' => 'Portfolio',          'port' => 'Portfolio',
         'groups' => 'Groups',          'groups' => 'Groups',
         'blogs' => 'Blogs',          'blogs' => 'Blogs',
           'about' => 'User Information',
         'docs' => 'Content',          'docs' => 'Content',
         'printout' => 'Printouts',          'printout' => 'Printouts',
         'passwd' => 'Change Password',          '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','passwd'];      my $typeorder = ['com','chat','boards','port','groups','blogs','about','printout','docs','grades','search','alert','reinit','passwd'];
     return ($typeorder,\%types);      return ($typeorder,\%types);
 }  }
   

Removed from v.1.22  
changed lines
  Added in v.1.29


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