--- loncom/interface/lonblockingmenu.pm 2016/10/22 02:03:31 1.21 +++ loncom/interface/lonblockingmenu.pm 2016/10/23 17:02:56 1.24 @@ -2,7 +2,7 @@ # Routines for configuring blocking of access to collaborative functions, # and specific resources during an exam # -# $Id: lonblockingmenu.pm,v 1.21 2016/10/22 02:03:31 raeburn Exp $ +# $Id: lonblockingmenu.pm,v 1.24 2016/10/23 17:02:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -116,7 +116,7 @@ Outputs: 2 $readonly - true if modification of blocking events is prohibited. $allowed - true if blocking events information can be shown. - + =item &get_timed_items() @@ -252,7 +252,7 @@ Inputs: 8 - $blockcount - number of existing blocking events in course - $readonly - if true, modification not allowed. - + Output: None @@ -344,6 +344,31 @@ Outputs: 1 - $intervalform - web form el =item &interval_details() +Creates name/scope of current interval and expandable/collapsible +showing which interval parameters apply to the current folder/resource + +Inputs: 6 + + - $item - course, map url, or resource symb + + - $type - course, map, or resource + + - $url - url of item (null if item is course). + + - $navmap - navmaps object + + - $intervals - Reference to hash of parameters for timed intervals + + - $parmcount - unique ID for current element. + + +Outputs: 2 + + - $itemname - name/scope of interval (timer) parameter + + - $iteminfo - Expandable/collapsible block showing which interval + (timer) parameters affect the current folder or resource. + =item &trigger_details_toggle() @@ -410,10 +435,10 @@ containing details about item with timed Inputs: none Output: 1 Javascript (with 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. - -=back + +=back =cut @@ -603,8 +628,8 @@ sub handler { # ------------------------ Choose between modifying existing block or adding new $r->print('
'); - - unless ($readonly) { + + unless ($readonly) { if ($blockcount > 0) { $r->print(<<"END");
@@ -633,20 +658,19 @@ END &Apache::loncourserespicker::get_navmap_object($crstype,'examblock'); # --------------------------------------------- Interface for adding a new block - if ($readonly) { - if (!$blockcount) { - $r->print($lt{'ncbc'}.'
'); - } - } else { + unless ($readonly) { &display_addblocker_table($r,$blockcount,\%ltext,\%intervals, $navmap,$errormsg); if ($blockcount > 0) { $r->print('
'); } } - # ------------------------------------------------ Interface for existing blocks - if ($blockcount > 0) { + if (!$blockcount) { + if ($readonly) { + $r->print($lt{'ncbc'}.'
'); + } + } else { &display_blocker_status($r,\%records,\%ltext,\%intervals, $navmap,$errormsg,$blockcount,$readonly); } @@ -1412,7 +1436,7 @@ sub create_interval_form { if (ref($resobj)) { $title = $resobj->compTitle(); } - if ($title eq '') { + if ($title eq '') { $title = &Apache::lonnet::gettitle($resource); } $hierarchy = &show_timer_path($type,$resource,$navmap);