--- loncom/interface/lonhtmlcommon.pm 2015/04/01 16:14:46 1.360 +++ loncom/interface/lonhtmlcommon.pm 2015/04/24 21:31:56 1.361 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.360 2015/04/01 16:14:46 damieng Exp $ +# $Id: lonhtmlcommon.pm,v 1.361 2015/04/24 21:31:56 musolffc Exp $ # # Copyright Michigan State University Board of Trustees # @@ -451,10 +451,12 @@ sub radio { &date_setter returns html and javascript for a compact date-setting form. To retrieve values from it, use &get_date_from_form. -Inputs - =over 4 +=item Inputs + +=over + =item $dname The name to prepend to the form elements. @@ -486,10 +488,12 @@ Defaults to empty, which indiciates the =back -Bugs +=item Bugs The method used to restrict user input will fail in the year 2400. +=back + =cut ############################################## @@ -703,7 +707,9 @@ sub build_url { get_date_from_form retrieves the date specified in an &date_setter form. -Inputs: +=over + +=item Inputs: =over 4 @@ -717,6 +723,8 @@ The unix time to use as the default in c =back +=back + Returns: Unix time represented in the form. =cut @@ -888,7 +896,9 @@ sub javascript_docopen { Returns html for a selection box which allows the user to choose the enrollment status of students. The selection box name is 'Status'. -Inputs: +=over + +=item Inputs: $status: the currently selected status. If undefined the value of $env{'form.Status'} is taken. If that is undefined, a value of 'Active' @@ -902,6 +912,8 @@ $size: the size (number of lines) of the $onchange: javascript to use when the value is changed. Enclosed in double quotes, ""s, not single quotes. +=back + Returns: a perl string as described. =cut @@ -949,7 +961,7 @@ sub StatusOptions { =pod -=item Progess Window Handling Routines +=item Progress Window Handling Routines These routines handle the creation, update, increment, and closure of progress windows. The progress window reports to the user the number @@ -963,9 +975,11 @@ of items completed and an estimate of th Writes javascript to the client to open a progress window and returns a data structure used for bookkeeping. -Inputs +=over -=over 4 +=item Inputs + +=over =item $r Apache request @@ -973,15 +987,18 @@ Inputs =back -Returns a hash containing the progress state data structure. +=back +Returns a hash containing the progress state data structure. =item &Update_PrgWin() Updates the text in the progress indicator. Does not increment the count. See &Increment_PrgWin. -Inputs: +=over + +=item Inputs: =over 4 @@ -993,25 +1010,38 @@ Inputs: =back +=back + Returns: none -=item Increment_PrgWin() +=item &Increment_PrgWin() Increment the count of items completed for the progress window by $step or 1 if no step is provided. -Inputs: +=over + +=item Inputs: =over 4 -=item $r Apache request +=item $r -=item $prog_state Pointer to the data structure returned by Create_PrgWin +Apache request + +=item $prog_state + +Pointer to the data structure returned by Create_PrgWin + +=item $extraInfo -=item $extraInfo A description of the items being iterated over. Typically -'student'. +A description of the items being iterated over. Typically 'student'. -=item $step (optional) counter step. Will be set to default 1 if ommited. step must be greater than 0 or empty. +=item $step + +(optional) counter step. Will be set to default 1 if ommited. step must be greater than 0 or empty. + +=back =back @@ -1022,7 +1052,9 @@ Returns: none Closes the progress window. -Inputs: +=over + +=item Inputs: =over 4 @@ -1032,6 +1064,8 @@ Inputs: =back +=back + Returns: none =back @@ -1720,13 +1754,38 @@ A link to help for the component will be All inputs can be undef without problems. -Inputs: $component (the text on the right side of the breadcrumbs trail), - $component_help - $menulink (boolean, controls whether to include a link to /adm/menu) - $helplink (if 'nohelp' don't include the orange help link) - $css_class (optional name for the class to apply to the table for CSS) - $no_mt (optional flag, 1 if &mt() is _not_ to be applied to $component - when including the text on the right. +=over + +=item Inputs: + +=over + +=item $component + +the text on the right side of the breadcrumbs trail + +=item $component_help + +=item $menulink + +boolean, controls whether to include a link to /adm/menu + +=item $helplink + +if 'nohelp' don't include the orange help link + +=item $css_class + +optional name for the class to apply to the table for CSS + +=item $no_mt + +optional flag, 1 if &mt() is _not_ to be applied to $component when including the text on the right + +=back + +=back + Returns a string containing breadcrumbs for the current page. =item &clear_breadcrumbs() @@ -1928,7 +1987,9 @@ Adds $html to $category of the breadcrum $html is usually a link to a page that invokes a function on the currently displayed data (e.g. print when viewing a problem) -Currently there are 3 possible values for $category: +=over + +=item Currently there are 3 possible values for $category: =over @@ -1942,7 +2003,9 @@ remaining items in right of breadcrumbs advanced tools shown in a separate box below breadcrumbs line =back - + +=back + returns: nothing =cut @@ -1981,8 +2044,17 @@ returns: nothing Creates html for breadcrumb tools (categories navigation and tools) and inserts \$breadcrumbs at the correct position. -input: \$breadcrumbs - a reference to the string containing prepared -breadcrumbs. +=over + +=item input: + +=over + +=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs. + +=back + +=back returns: nothing @@ -2008,8 +2080,17 @@ returns: nothing Creates html for advanced tools (category advtools) and inserts \$breadcrumbs at the correct position. -input: \$breadcrumbs - a reference to the string containing prepared -breadcrumbs (after render_tools call). +=over + +=item input: + +=over + +=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs (after render_tools call). + +=back + +=back returns: nothing @@ -3507,7 +3588,9 @@ sub scripttag { Constructs a XHTML list from \@array. -input: +=over + +=item input: =over @@ -3521,6 +3604,8 @@ Attributes for \n"; } -=pod +=over =item &funclist_from_array( \@array, {legend => 'text for legend'} ) @@ -3749,7 +3853,7 @@ sub funclist_from_array { { listattr => {class => 'LC_funclist'} }); } -=pod +=over =item &actionbox( \@array )