[LON-CAPA-cvs] cvs: loncom /interface entities.pm lonerrorhandler.pm lonevaluate.pm lonfeedback.pm lonnavmaps.pm

jms lon-capa-cvs-allow@mail.lon-capa.org
Fri, 21 Nov 2008 20:17:11 -0000


This is a MIME encoded message

--jms1227298631
Content-Type: text/plain

jms		Fri Nov 21 20:17:11 2008 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm lonfeedback.pm lonevaluate.pm 
                     	lonerrorhandler.pm entities.pm 
  Log:
  Fixd POD documentation
  
--jms1227298631
Content-Type: text/plain
Content-Disposition: attachment; filename="jms-20081121201711.txt"

Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.416 loncom/interface/lonnavmaps.pm:1.417
--- loncom/interface/lonnavmaps.pm:1.416	Tue Nov 18 20:18:37 2008
+++ loncom/interface/lonnavmaps.pm	Fri Nov 21 20:17:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.416 2008/11/18 20:18:37 jms Exp $
+# $Id: lonnavmaps.pm,v 1.417 2008/11/21 20:17:11 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -425,31 +425,45 @@
 Very, very, very, VERY English-only... goodness help a localizer on
 this func...
 
-=item 
+=item resource()
 
-=item 
+returns 0
 
-=item 
+=item communication_status()
 
-=item 
+returns 1
 
-=item 
+=item quick_status()
 
-=item 
+returns 2
 
-=item 
+=item long_status()
 
-=item 
+returns 3
 
-=item 
+=item part_status_summary()
 
-=item 
+returns 4
 
-=item 
+=item render_resource()
 
-=item 
+=item render_communication_status()
 
-=item 
+=item render_quick_status()
+
+=item render_long_status()
+
+=item render_parts_summary_status()
+
+=item setDefault()
+
+=item cmp_title()
+
+=item render()
+
+=item add_linkitem()
+
+=item show_linkitems()
 
 =back
 
@@ -544,9 +558,7 @@
 ENDUPDATE
 }
 
-# Convenience functions: Returns a string that adds or subtracts
-# the second argument from the first hash, appropriate for the 
-# query string that determines which folders to recurse on
+
 sub addToFilter {
     my $hashIn = shift;
     my $addition = shift;
@@ -565,8 +577,6 @@
     return join(",", keys(%hash));
 }
 
-# Convenience function: Given a stack returned from getStack on the iterator,
-# return the correct src() value.
 sub getLinkForResource {
     my $stack = shift;
     my $res;
@@ -604,11 +614,7 @@
     return;
 }
 
-# Convenience function: This separates the logic of how to create
-# the problem text strings ("Due: DATE", "Open: DATE", "Not yet assigned",
-# etc.) into a separate function. It takes a resource object as the
-# first parameter, and the part number of the resource as the second.
-# It's basically a big switch statement on the status of the resource.
+
 
 sub getDescription {
     my $res = shift;
@@ -681,8 +687,6 @@
     }
 }
 
-# Convenience function, so others can use it: Is the problem due in less than
-# 24 hours, and still can be done?
 
 sub dueInLessThan24Hours {
     my $res = shift;
@@ -695,8 +699,7 @@
 	    $res->duedate($part) > time();
 }
 
-# Convenience function, so others can use it: Is there only one try remaining for the
-# part, with more than one try to begin with, not due yet and still can be done?
+
 sub lastTry {
     my $res = shift;
     my $part = shift;
@@ -708,23 +711,11 @@
         $res->duedate($part) > time();
 }
 
-# This puts a human-readable name on the env variable.
 
 sub advancedUser {
     return $env{'request.role.adv'};
 }
 
-
-# timeToHumanString takes a time number and converts it to a
-# human-readable representation, meant to be used in the following
-# manner:
-# print "Due $timestring"
-# print "Open $timestring"
-# print "Answer available $timestring"
-# Very, very, very, VERY English-only... goodness help a localizer on
-# this func...
-
-
 sub timeToHumanString {
     my ($time,$type,$format) = @_;
 
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.256 loncom/interface/lonfeedback.pm:1.257
--- loncom/interface/lonfeedback.pm:1.256	Tue Nov 18 19:14:22 2008
+++ loncom/interface/lonfeedback.pm	Fri Nov 21 20:17:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.256 2008/11/18 19:14:22 jms Exp $
+# $Id: lonfeedback.pm,v 1.257 2008/11/21 20:17:11 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -27,133 +27,6 @@
 #
 ###
 
-=pod
-
-=head1 NAME
-
-Apache::lonfeedback.pm
-
-=head1 SYNOPSIS
-
-Handles feedback from students to instructors and system administrators.
-
-Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework.
-
-Used by lonmsg.pm.
-
-This is part of the LearningOnline Network with CAPA project
-described at http://www.lon-capa.org.
-
-=head1 OVERVIEW
-
-None
-
-=head1 SUBROUTINES
-
-=over
-
-=item discussion_open()
-
-=item discussion_visible()
-
-=item list_discussion()
-
-=item send_feedback_link()
-
-=item send_message_link()
-
-=item action_links_bar()
-
-=item postingform_display()
-
-=item build_posting_display
-
-=item filter_regexp()
-
-=item get_post_contents()
-
-=item replicate_attachments()
-
-=item mail_screen()
-
-=item print_display_options()
-
-=item print_sortfilter_options()
-
-=item print_showposters()
-
-=item get_post_versions()
-
-=item get_post_attachments()
-
-=item fail_redirect()
-
-=item redirect_back()
-
-=item no_redirect_back()
-
-=item screen_header()
-
-=item resource_output()
-
-=item clear_out_html()
-
-=item assemble_email()
-
-=item feedback_available()
-
-=item send_msg()
-
-=item adddiscuss()
-
-=item get_discussion_info()
-
-=item show_preview()
-
-=item newline_to_br()
-
-=item generate_preview_button()
-
-=item modify_attachments()
-
-=item process_attachments()
-
-=item generate_attachments_button()
-
-=item extract_attachments()
-
-=item construct_attachmenturl()
-
-=item add_blog_checkbox()
-
-=item has_discussion()
-
-=item sort_filter_names()
-
-=item handler()
-
-=item blocked_reply_or_edit()
-
-=item wrap_symb()
-
-=item dewrapper()
-
-=item get_feedurl()
-
-=item get_feedurl_and_clean_symb()
-
-=item editing_allowed()
-
-=item check_group_priv()
-
-=item group_args()
-
-=item get_resource_title()
-
-=back
-
-=cut
-
 package Apache::lonfeedback;
 
 use strict;
@@ -4086,3 +3959,131 @@
 
 1;
 __END__
+
+
+=pod
+
+=head1 NAME
+
+Apache::lonfeedback.pm
+
+=head1 SYNOPSIS
+
+Handles feedback from students to instructors and system administrators.
+
+Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework.
+
+Used by lonmsg.pm.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 OVERVIEW
+
+None
+
+=head1 SUBROUTINES
+
+=over
+
+=item discussion_open()
+
+=item discussion_visible()
+
+=item list_discussion()
+
+=item send_feedback_link()
+
+=item send_message_link()
+
+=item action_links_bar()
+
+=item postingform_display()
+
+=item build_posting_display
+
+=item filter_regexp()
+
+=item get_post_contents()
+
+=item replicate_attachments()
+
+=item mail_screen()
+
+=item print_display_options()
+
+=item print_sortfilter_options()
+
+=item print_showposters()
+
+=item get_post_versions()
+
+=item get_post_attachments()
+
+=item fail_redirect()
+
+=item redirect_back()
+
+=item no_redirect_back()
+
+=item screen_header()
+
+=item resource_output()
+
+=item clear_out_html()
+
+=item assemble_email()
+
+=item feedback_available()
+
+=item send_msg()
+
+=item adddiscuss()
+
+=item get_discussion_info()
+
+=item show_preview()
+
+=item newline_to_br()
+
+=item generate_preview_button()
+
+=item modify_attachments()
+
+=item process_attachments()
+
+=item generate_attachments_button()
+
+=item extract_attachments()
+
+=item construct_attachmenturl()
+
+=item add_blog_checkbox()
+
+=item has_discussion()
+
+=item sort_filter_names()
+
+=item handler()
+
+=item blocked_reply_or_edit()
+
+=item wrap_symb()
+
+=item dewrapper()
+
+=item get_feedurl()
+
+=item get_feedurl_and_clean_symb()
+
+=item editing_allowed()
+
+=item check_group_priv()
+
+=item group_args()
+
+=item get_resource_title()
+
+=back
+
+=cut
\ No newline at end of file
Index: loncom/interface/lonevaluate.pm
diff -u loncom/interface/lonevaluate.pm:1.25 loncom/interface/lonevaluate.pm:1.26
--- loncom/interface/lonevaluate.pm:1.25	Tue Nov 18 19:14:22 2008
+++ loncom/interface/lonevaluate.pm	Fri Nov 21 20:17:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Evaluate
 #
-# $Id: lonevaluate.pm,v 1.25 2008/11/18 19:14:22 jms Exp $
+# $Id: lonevaluate.pm,v 1.26 2008/11/21 20:17:11 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -26,24 +26,7 @@
 # http://www.lon-capa.org/
 #
 
-=pod
-
-=head1 NAME
-
-Apache::lonevaluate.pm
-
-=head1 SYNOPSIS
-
-Handles evaluation.
 
-This is part of the LearningOnline Network with CAPA project
-described at http://www.lon-capa.org.
-
-=head1 OVERVIEW
-
-None
-
-=cut
 
 package Apache::lonevaluate;
 
@@ -228,3 +211,22 @@
 
 1;
 __END__
+
+=pod
+
+=head1 NAME
+
+Apache::lonevaluate.pm
+
+=head1 SYNOPSIS
+
+Handles evaluation.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 OVERVIEW
+
+None
+
+=cut
Index: loncom/interface/lonerrorhandler.pm
diff -u loncom/interface/lonerrorhandler.pm:1.19 loncom/interface/lonerrorhandler.pm:1.20
--- loncom/interface/lonerrorhandler.pm:1.19	Tue Nov 18 19:14:22 2008
+++ loncom/interface/lonerrorhandler.pm	Fri Nov 21 20:17:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Internal Server Error Handler
 #
-# $Id: lonerrorhandler.pm,v 1.19 2008/11/18 19:14:22 jms Exp $
+# $Id: lonerrorhandler.pm,v 1.20 2008/11/21 20:17:11 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -26,24 +26,7 @@
 # http://www.lon-capa.org/
 #
 
-=pod
-
-=head1 NAME
-
-Apache::lonerrorhandler.pm
-
-=head1 SYNOPSIS
-
-Handles errors.
 
-This is part of the LearningOnline Network with CAPA project
-described at http://www.lon-capa.org.
-
-=head1 OVERVIEW
-
-None
-
-=cut
 
 package Apache::lonerrorhandler;
 
@@ -182,3 +165,23 @@
 
 1;
 __END__
+
+
+=pod
+
+=head1 NAME
+
+Apache::lonerrorhandler.pm
+
+=head1 SYNOPSIS
+
+Handles errors.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 OVERVIEW
+
+None
+
+=cut
\ No newline at end of file
Index: loncom/interface/entities.pm
diff -u loncom/interface/entities.pm:1.17 loncom/interface/entities.pm:1.18
--- loncom/interface/entities.pm:1.17	Thu Nov 20 13:07:32 2008
+++ loncom/interface/entities.pm	Fri Nov 21 20:17:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # entity -> tex.
 #
-# $Id: entities.pm,v 1.17 2008/11/20 13:07:32 raeburn Exp $
+# $Id: entities.pm,v 1.18 2008/11/21 20:17:11 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -26,111 +26,6 @@
 #
 #
 
-=pod
-
-=head1 NAME
-
-Apache::entities.pm
-
-=head1 SYNOPSIS
-
-This file contains a table driven entity-->latex converter.
-
-This is part of the LearningOnline Network with CAPA project
-described at http://www.lon-capa.org.
-
-=head1 OVERVIEW
-
-
-Assumptions:
- The number of entities in a resource is small compared with the
- number of possible entities that might be translated.
- Therefore the strategy is to match a general entity pattern
- &.+; over and over, pull out the match look it up in an entity -> tex hash
- and do the replacement.
-
-In order to simplify the hash, the following reductions are done:
- &#d+; have the &# and ; stripped and is converted to an int.
- &#.+; have the &#x and ; stripped and is converted to an int as a hex
-                           value.
- All others have the & and ; stripped.
-
-
-The hash:  Add new conversions here; leave off the leading & and the trailing ;
-all numeric entities need only appear as their decimal versions
-(e.g. no need for 1234 is sufficient, no need for 0x4d2 as well.
-
-This entity table is mercilessly cribbed from the  HTML pocket reference
-table starting at pg 82.  In most cases the LaTeX equivalent codes come from
-the original massive regular expression replacements originally by 
-A. Sakharuk in lonprintout.pm
-
-I also want to acknowledge
- ISO Character entities and their LaTeX equivalents by 
-    Vidar Bronken Gundersen, and Rune Mathisen
-  http://www.bitjungle.com/isoent-ref.pdf
-
-
-Note numerical entities are essentially unicode character codes.
-
-
-=head1 SUBROUTINES
-
-=over
-
-=item entity_to_utf8()
-
-
-Convert a numerical entity (that does not exist in our hash)
- to its UTF-8 equivalent representation.
- This allows us to support, to some extent, any entity for which
- dvipdf can find a gylph (given that LaTeX is now UTF-8 clean).
-
-Parameters:
-  unicode  - The unicode for the character.  This is assumed to
-             be a decimal value
-Returns:
-  The UTF-8 equiavalent of the value.
-
-=item entity_to_latex()
-
- Convert an entity to the corresponding LateX if possible.
- If not possible, and the entity is numeric,
- the entity is treated like a Unicode character and converted
- to UTF-8 which should display as long as dvipdf can find the
- appropriate glyph.
-
- The entity is assumed to have already had the 
- &;  or & ; removed
-
-Parameters:
-  entity    - Name of entity to convert.
-Returns:
- One of the following:
-  - Latex string that produces the entity.
-  - UTF-8 equivalent of a numeric entity for which we don't have a latex string.
-  - ' ' for text entities for which there's no latex equivalent.
-
-
-=item replace_entities()
-
- Convert all the entities in a string.
- We locate all the entities, pass them into entity_to_latex and 
- and replace occurences in the input string.
- The assumption is that there are few entities in any string/document
- so this looping is not too bad.  The advantage of looping vs. regexping is
- that we now can use lookup tables for the translation in entity_to_latex above.
-
-Parameters:
-  input   - Input string/document
-Returns
-  input with entities replaced by latexable stuff (UTF-8 encodings or
-  latex control strings to produce the entity.
-
-=back
-
-=cut
-
 package Apache::entities;
 use strict;
 
@@ -1164,3 +1059,108 @@
 1; 
 
 __END__
+
+=pod
+
+=head1 NAME
+
+Apache::entities.pm
+
+=head1 SYNOPSIS
+
+This file contains a table driven entity-->latex converter.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 OVERVIEW
+
+
+Assumptions:
+ The number of entities in a resource is small compared with the
+ number of possible entities that might be translated.
+ Therefore the strategy is to match a general entity pattern
+ &.+; over and over, pull out the match look it up in an entity -> tex hash
+ and do the replacement.
+
+In order to simplify the hash, the following reductions are done:
+ &#d+; have the &# and ; stripped and is converted to an int.
+ &#.+; have the &#x and ; stripped and is converted to an int as a hex
+                           value.
+ All others have the & and ; stripped.
+
+
+The hash:  Add new conversions here; leave off the leading & and the trailing ;
+all numeric entities need only appear as their decimal versions
+(e.g. no need for 1234 is sufficient, no need for 0x4d2 as well.
+
+This entity table is mercilessly cribbed from the  HTML pocket reference
+table starting at pg 82.  In most cases the LaTeX equivalent codes come from
+the original massive regular expression replacements originally by 
+A. Sakharuk in lonprintout.pm
+
+I also want to acknowledge
+ ISO Character entities and their LaTeX equivalents by 
+    Vidar Bronken Gundersen, and Rune Mathisen
+  http://www.bitjungle.com/isoent-ref.pdf
+
+
+Note numerical entities are essentially unicode character codes.
+
+
+=head1 SUBROUTINES
+
+=over
+
+=item entity_to_utf8()
+
+
+Convert a numerical entity (that does not exist in our hash)
+ to its UTF-8 equivalent representation.
+ This allows us to support, to some extent, any entity for which
+ dvipdf can find a gylph (given that LaTeX is now UTF-8 clean).
+
+Parameters:
+  unicode  - The unicode for the character.  This is assumed to
+             be a decimal value
+Returns:
+  The UTF-8 equiavalent of the value.
+
+=item entity_to_latex()
+
+ Convert an entity to the corresponding LateX if possible.
+ If not possible, and the entity is numeric,
+ the entity is treated like a Unicode character and converted
+ to UTF-8 which should display as long as dvipdf can find the
+ appropriate glyph.
+
+ The entity is assumed to have already had the 
+ &;  or & ; removed
+
+Parameters:
+  entity    - Name of entity to convert.
+Returns:
+ One of the following:
+  - Latex string that produces the entity.
+  - UTF-8 equivalent of a numeric entity for which we don't have a latex string.
+  - ' ' for text entities for which there's no latex equivalent.
+
+
+=item replace_entities()
+
+ Convert all the entities in a string.
+ We locate all the entities, pass them into entity_to_latex and 
+ and replace occurences in the input string.
+ The assumption is that there are few entities in any string/document
+ so this looping is not too bad.  The advantage of looping vs. regexping is
+ that we now can use lookup tables for the translation in entity_to_latex above.
+
+Parameters:
+  input   - Input string/document
+Returns
+  input with entities replaced by latexable stuff (UTF-8 encodings or
+  latex control strings to produce the entity.
+
+=back
+
+=cut

--jms1227298631--