'.
+ &Apache::loncommon::end_data_table_row();
+ }
+ $output .= &Apache::loncommon::end_data_table();
+ $output .= &row_closure();
+ return $output;
+}
-=back
-Returns: a string containing HTML for a multiple select box for
-selecting sections of a course.
+sub submit_row {
+ my ($title,$cmd,$submit_text,$css_class) = @_;
+ my $output = &row_title($title,$css_class,'LC_pick_box_submit');
+ $output .= qq|
+
+
+
+
+ \n|;
+ return $output;
+}
-The form element name is 'Section'. @$sections is sorted prior to output.
+sub course_custom_roles {
+ my ($cdom,$cnum) = @_;
+ my %returnhash=();
+ my %coursepersonnel=&Apache::lonnet::dump('nohist_userroles',$cdom,$cnum);
+ foreach my $person (sort(keys(%coursepersonnel))) {
+ my ($role) = ($person =~ /^([^:]+):/);
+ my ($end,$start) = split(/:/,$coursepersonnel{$person});
+ if ($end == -1 && $start == -1) {
+ next;
+ }
+ if ($role =~ m|^cr/[^/]+/[^/]+/[^/]|) {
+ $returnhash{$role} ++;
+ }
+ }
+ return %returnhash;
+}
-=cut
-########################################################
-########################################################
-sub MultipleSectionSelect {
- my ($sections,$selectedSections)=@_;
+##############################################
+##############################################
+
+# topic_bar
+#
+# Generates a div containing an (optional) number with a white background followed by a
+# title with a background color defined in the corresponding CSS: LC_topic_bar
+# Inputs:
+# 1. number to display.
+# If input for number is empty only the title will be displayed.
+# 2. title text to display.
+# Outputs - a scalar containing html mark-up for the div.
+
+sub topic_bar {
+ my ($num,$title) = @_;
+ my $number = '';
+ if ($num ne '') {
+ $number = ''.$num.'';
+ }
+ return '
'.$number.$title.'
';
+}
+
+##############################################
+##############################################
+# echo_form_input
+#
+# Generates html markup to add form elements from the referrer page
+# as hidden form elements (values encoded) in the new page.
+#
+# Intended to support two types of use
+# (a) to allow backing up to earlier pages in a multi-page
+# form submission process using a breadcrumb trail.
+#
+# (b) to allow the current page to be reloaded with form elements
+# set on previous page to remain unchanged. An example would
+# be where the a page containing a dynamically-built table of data is
+# is to be redisplayed, with only the sort order of the data changed.
+#
+# Inputs:
+# 1. Reference to array of form elements in the submitted form on
+# the referrer page which are to be excluded from the echoed elements.
+#
+# 2. Reference to array of regular expressions, which if matched in the
+# name of the form element n the referrer page will be omitted from echo.
+#
+# Outputs: A scalar containing the html markup for the echoed form
+# elements (all as hidden elements, with values encoded).
- my $Str = '';
- $Str .= ''."\n";
- foreach (sort @$sections) {
- $Str .= '