version 1.1075.2.55, 2013/11/20 05:11:34
|
version 1.1075.2.56, 2013/12/13 04:21:21
|
Line 1362 sub top_nav_help {
|
Line 1362 sub top_nav_help {
|
|
|
return <<"END"; |
return <<"END"; |
$banner_link |
$banner_link |
<a href="$link" title="$title">$text</a> |
<a href="$link" title="$title">$text</a> |
END |
END |
} |
} |
|
|
Line 1724 RESIZE
|
Line 1724 RESIZE
|
|
|
=head1 Excel and CSV file utility routines |
=head1 Excel and CSV file utility routines |
|
|
=over 4 |
|
|
|
=cut |
=cut |
|
|
############################################################### |
############################################################### |
Line 1733 RESIZE
|
Line 1731 RESIZE
|
|
|
=pod |
=pod |
|
|
|
=over 4 |
|
|
=item * &csv_translate($text) |
=item * &csv_translate($text) |
|
|
Translate $text to allow it to be output as a 'comma separated values' |
Translate $text to allow it to be output as a 'comma separated values' |
Line 5271 sub make_attr_string {
|
Line 5271 sub make_attr_string {
|
} |
} |
|
|
my $attr_string; |
my $attr_string; |
foreach my $attr (keys(%$attr_ref)) { |
foreach my $attr (sort(keys(%$attr_ref))) { |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
} |
} |
return $attr_string; |
return $attr_string; |
Line 7262 sub headtag {
|
Line 7262 sub headtag {
|
|
|
my $result = |
my $result = |
'<head>'. |
'<head>'. |
&font_settings(); |
&font_settings($args); |
|
|
my $inhibitprint = &print_suppression(); |
my $inhibitprint = &print_suppression(); |
|
|
Line 7327 ADDMETA
|
Line 7327 ADDMETA
|
|
|
Returns neccessary <meta> to set the proper encoding |
Returns neccessary <meta> to set the proper encoding |
|
|
Inputs: none |
Inputs: optional reference to HASH -- $args passed to &headtag() |
|
|
=cut |
=cut |
|
|
sub font_settings { |
sub font_settings { |
|
my ($args) = @_; |
my $headerstring=''; |
my $headerstring=''; |
if (!$env{'browser.mathml'} && $env{'browser.unicode'}) { |
if ((!$env{'browser.mathml'} && $env{'browser.unicode'}) || |
|
((ref($args) eq 'HASH') && ($args->{'browser.unicode'}))) { |
$headerstring.= |
$headerstring.= |
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; |
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n"; |
} |
} |
return $headerstring; |
return $headerstring; |
} |
} |
Line 7439 sub xml_begin {
|
Line 7441 sub xml_begin {
|
.'<html xmlns:math="http://www.w3.org/1998/Math/MathML" ' |
.'<html xmlns:math="http://www.w3.org/1998/Math/MathML" ' |
.'xmlns="http://www.w3.org/1999/xhtml">'; |
.'xmlns="http://www.w3.org/1999/xhtml">'; |
} else { |
} else { |
$output='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' |
$output='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n" |
.'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'; |
.'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n"; |
} |
} |
return $output; |
return $output; |
} |
} |
Line 7932 sub validate_page {
|
Line 7934 sub validate_page {
|
|
|
|
|
sub start_scrollbox { |
sub start_scrollbox { |
my ($outerwidth,$width,$height,$id,$bgcolor,$cursor,$needjsready)=@_; |
my ($outerwidth,$width,$height,$id,$bgcolor,$cursor,$needjsready) = @_; |
unless ($outerwidth) { $outerwidth='520px'; } |
unless ($outerwidth) { $outerwidth='520px'; } |
unless ($width) { $width='500px'; } |
unless ($width) { $width='500px'; } |
unless ($height) { $height='200px'; } |
unless ($height) { $height='200px'; } |
Line 7952 sub start_scrollbox {
|
Line 7954 sub start_scrollbox {
|
$nicescroll_js |
$nicescroll_js |
|
|
<table style="width: $outerwidth; border: 1px solid none;"$table_id><tr><td style="width: $width;$tdcol"> |
<table style="width: $outerwidth; border: 1px solid none;"$table_id><tr><td style="width: $width;$tdcol"> |
<div style="overflow:auto; width:$width; height: $height;"$div_id> |
<div style="overflow:auto; width:$width; height:$height;"$div_id> |
END |
END |
} |
} |
|
|
Line 10265 sub ask_for_embedded_content {
|
Line 10267 sub ask_for_embedded_content {
|
return ($output,$counter,$numpathchg); |
return ($output,$counter,$numpathchg); |
} |
} |
|
|
|
|
=pod |
=pod |
|
|
=item * clean_path($name) |
=item * clean_path($name) |
Line 12056 sub cleanup_empty_dirs {
|
Line 12057 sub cleanup_empty_dirs {
|
|
|
=pod |
=pod |
|
|
=item &get_folder_hierarchy() |
=item * &get_folder_hierarchy() |
|
|
Provides hierarchy of names of folders/sub-folders containing the current |
Provides hierarchy of names of folders/sub-folders containing the current |
item, |
item, |
Line 13369 sub extract_categories {
|
Line 13370 sub extract_categories {
|
|
|
=pod |
=pod |
|
|
=item *&recurse_categories() |
=item * &recurse_categories() |
|
|
Recursively used to generate breadcrumb trails for course categories. |
Recursively used to generate breadcrumb trails for course categories. |
|
|
Line 13440 sub recurse_categories {
|
Line 13441 sub recurse_categories {
|
|
|
=pod |
=pod |
|
|
=item *&assign_categories_table() |
=item * &assign_categories_table() |
|
|
Create a datatable for display of hierarchical categories in a domain, |
Create a datatable for display of hierarchical categories in a domain, |
with checkboxes to allow a course to be categorized. |
with checkboxes to allow a course to be categorized. |
Line 13517 sub assign_categories_table {
|
Line 13518 sub assign_categories_table {
|
|
|
=pod |
=pod |
|
|
=item *&assign_category_rows() |
=item * &assign_category_rows() |
|
|
Create a datatable row for display of nested categories in a domain, |
Create a datatable row for display of nested categories in a domain, |
with checkboxes to allow a course to be categorized,called recursively. |
with checkboxes to allow a course to be categorized,called recursively. |
Line 14894 sub check_recaptcha {
|
Line 14895 sub check_recaptcha {
|
return $captcha_chk; |
return $captcha_chk; |
} |
} |
|
|
|
sub cleanup_html { |
|
my ($incoming) = @_; |
|
my $outgoing; |
|
if ($incoming ne '') { |
|
$outgoing = $incoming; |
|
$outgoing =~ s/;/;/g; |
|
$outgoing =~ s/\#/#/g; |
|
$outgoing =~ s/\&/&/g; |
|
$outgoing =~ s/</</g; |
|
$outgoing =~ s/>/>/g; |
|
$outgoing =~ s/\(/(/g; |
|
$outgoing =~ s/\)/)/g; |
|
$outgoing =~ s/"/"/g; |
|
$outgoing =~ s/'/'/g; |
|
$outgoing =~ s/\$/$/g; |
|
$outgoing =~ s{/}{/}g; |
|
$outgoing =~ s/=/=/g; |
|
$outgoing =~ s/\\/\/g |
|
} |
|
return $outgoing; |
|
} |
|
|
=pod |
=pod |
|
|
=back |
=back |