[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm run.pm scripttag.pm style.pm
jms
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 24 Nov 2008 18:55:01 -0000
This is a MIME encoded message
--jms1227552901
Content-Type: text/plain
jms Mon Nov 24 18:55:01 2008 EDT
Modified files:
/loncom/xml run.pm style.pm scripttag.pm londefdef.pm
Log:
Added/modified POD comments
--jms1227552901
Content-Type: text/plain
Content-Disposition: attachment; filename="jms-20081124185501.txt"
Index: loncom/xml/run.pm
diff -u loncom/xml/run.pm:1.59 loncom/xml/run.pm:1.60
--- loncom/xml/run.pm:1.59 Thu Sep 11 14:47:24 2008
+++ loncom/xml/run.pm Mon Nov 24 18:55:01 2008
@@ -1,6 +1,6 @@
package Apache::run;
#
-# $Id: run.pm,v 1.59 2008/09/11 14:47:24 bisitz Exp $
+# $Id: run.pm,v 1.60 2008/11/24 18:55:01 jms Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -191,3 +191,29 @@
1;
__END__;
+
+=pod
+
+=head1 NAME
+
+Apache::run.pm
+
+=head1 SYNOPSIS
+
+Used to prevent poorly written problems from
+causing lingering after effects
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+
+=head1 NOTABLE SUBROUTINES
+
+=over
+
+=item run(), dump(), evaluate()
+
+=back
+
+=cut
+
Index: loncom/xml/style.pm
diff -u loncom/xml/style.pm:1.21 loncom/xml/style.pm:1.22
--- loncom/xml/style.pm:1.21 Wed Jan 21 13:03:29 2004
+++ loncom/xml/style.pm Mon Nov 24 18:55:01 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Style Parser Module (new version)
#
-# $Id: style.pm,v 1.21 2004/01/21 13:03:29 sakharuk Exp $
+# $Id: style.pm,v 1.22 2008/11/24 18:55:01 jms Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -163,3 +163,32 @@
1;
__END__
+
+=pod
+
+=head1 NAME
+
+Apache::style.pm
+
+=head1 SYNOPSIS
+
+Style parsing module
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+
+=head1 SUBROUTINES
+
+=over
+
+=item styleparser()
+
+=item testkey()
+
+=item testvalue()
+
+=back
+
+=cut
+
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.148 loncom/xml/scripttag.pm:1.149
--- loncom/xml/scripttag.pm:1.148 Wed Sep 10 19:45:23 2008
+++ loncom/xml/scripttag.pm Mon Nov 24 18:55:01 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# <script> definiton
#
-# $Id: scripttag.pm,v 1.148 2008/09/10 19:45:23 droeschl Exp $
+# $Id: scripttag.pm,v 1.149 2008/11/24 18:55:01 jms Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,16 +81,6 @@
return ('','no');
}
-=pod
-
-=item start_LONCAPA_INTERNAL_LONHTTPD_PORT
-
-emits a pice of javascript that says a global js variable to the
-current lonhttp port, currently used by the remote control to find out
-where to load images from
-
-=cut
-
sub start_LONCAPA_INTERNAL_LONHTTPD_PORT {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
if ($target eq 'web' || $target eq 'webgrade') {
@@ -636,3 +626,33 @@
1;
__END__
+
+=pod
+
+=head1 NAME
+
+Apache::scripttag.pm
+
+=head1 SYNOPSIS
+
+implements <script>, <scriptlib>, <parserlib>,
+and <import>
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+
+=head1 NOTABLE SUBROUTINES
+
+=over
+
+=item start_LONCAPA_INTERNAL_LONHTTPD_PORT()
+
+emits a pice of javascript that says a global js variable to the
+current lonhttp port, currently used by the remote control to find out
+where to load images from
+
+=back
+
+=cut
+
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.396 loncom/xml/londefdef.pm:1.397
--- loncom/xml/londefdef.pm:1.396 Mon Nov 10 11:17:50 2008
+++ loncom/xml/londefdef.pm Mon Nov 24 18:55:01 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.396 2008/11/10 11:17:50 foxr Exp $
+# $Id: londefdef.pm,v 1.397 2008/11/24 18:55:01 jms Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -4304,27 +4304,9 @@
}
return '';
}
-#
-# Get correct sizing parameter for an image given
-# it's initial ht. and wid. This allows sizing of
-# images that are generated on-the-fly (e.g. gnuplot)
-# as well as serving as a utility for image_size.
-#
-# Parameter:
-# height_param
-# width_param - Initial picture dimensions.
-# scaling - A scale factor.
-# parstack, - the current stack of tag attributes
-# from the xml parser
-# safeeval, - pointer to the safespace
-# depth, - from what level in the stack to look for attributes
-# (assumes -1 if unspecified)
-# cis - look for attrubutes case insensitively
-# (assumes false)
-#
-# Returns:
-# height, width - new dimensions.
-#
+
+
+
sub resize_image {
my ($height_param, $width_param, $scaling,
$parstack, $safeeval, $depth, $cis) = @_;
@@ -4514,11 +4496,8 @@
}
return $file,$path;
}
-# Converts a measurement in to mm from any of
-# the other valid LaTeX units of measure.
-# If the units of measure are missing from the
-# parameter, it is assumed to be in and returned
-# with mm units of measure
+
+
sub recalc {
my $argument = shift;
if (not $argument=~/(mm|cm|in|pc|pt)/) {return $argument.' mm';}
@@ -4562,19 +4541,7 @@
return $value;
}
-# Wrap image 'stuff' inside of the LaTeX required to implement
-# alignment:
-# align_tex_image(align, latex_rendering, image)
-# Where:
-# align - The HTML alignment specification.
-# latex_rendering - rendering hint for latex.
-# image - The LaTeX needed to insert the image itsef.
-# width,height - dimensions of the image.
-# Returns:
-# The 1/2 wrapped image and the stuff required to close the
-# wrappage. This allows e.g. randomlabel to insert more stuff
-# into the closure.
-#
+
sub align_latex_image {
my ($align, $latex_rendering, $image, $width, $height) = @_;
my $currentstring; # The 1/2 wrapped image.
@@ -4641,16 +4608,7 @@
return ($currentstring, $closure);
}
-# is_inside_of $tagstack $tag
-# This sub returns true if the current state of Xml processing
-# is inside of the tag.
-# Parameters:
-# tagstack - The tagstack from the parser.
-# tag - The tag (without the <>'s.).
-# Sample usage:
-# if (is_inside_of($tagstack "table")) {
-# # I'm in a table....
-# }
+
sub is_inside_of {
my ($tagstack, $tag) = @_;
my @stack = @$tagstack;
@@ -4663,5 +4621,106 @@
}
+=pod
+
+=head1 NAME
+
+Apache::londefdef.pm
+
+=head1 SYNOPSIS
+
+Tags Default Definition Module
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+
+=head1 NOTABLE SUBROUTINES
+
+=over
+
+=item start_hideweboutput()
+
+=item end_hideweboutput()
+
+=item image_replication()
+
+=item resize_image()
+
+ Get correct sizing parameter for an image given
+ it's initial ht. and wid. This allows sizing of
+ images that are generated on-the-fly (e.g. gnuplot)
+ as well as serving as a utility for image_size.
+
+ Parameter:
+ height_param
+ width_param - Initial picture dimensions.
+ scaling - A scale factor.
+ parstack, - the current stack of tag attributes
+ from the xml parser
+ safeeval, - pointer to the safespace
+ depth, - from what level in the stack to look for attributes
+ (assumes -1 if unspecified)
+ cis - look for attrubutes case insensitively
+ (assumes false)
+
+ Returns:
+ height, width - new dimensions.
+
+=item image_size()
+
+=item image_width()
+
+=item image_height()
+
+=item get_eps_image()
+
+=item eps_generation()
+
+=item file_path()
+
+=item recalc()
+
+ Converts a measurement in to mm from any of
+ the other valid LaTeX units of measure.
+ If the units of measure are missing from the
+ parameter, it is assumed to be in and returned
+ with mm units of measure
+
+=item LATEX_length()
+
+=item align_latex_image()
+
+ Wrap image 'stuff' inside of the LaTeX required to implement
+ alignment:
+ align_tex_image(align, latex_rendering, image)
+ Where:
+ align - The HTML alignment specification.
+ latex_rendering - rendering hint for latex.
+ image - The LaTeX needed to insert the image itsef.
+ width,height - dimensions of the image.
+ Returns:
+ The 1/2 wrapped image and the stuff required to close the
+ wrappage. This allows e.g. randomlabel to insert more stuff
+ into the closure.
+
+
+=item is_inside_of($tagstack, $tag)
+ This sub returns true if the current state of Xml processing is inside of the tag.
+ Parameters:
+ tagstack - The tagstack from the parser.
+ tag - The tag (without the <>'s.).
+ Sample usage:
+ if (is_inside_of($tagstack "table")) {
+ I'm in a table....
+ }
+
+
+
+=back
+
+=cut
+
+
1;
__END__
--jms1227552901--