--- loncom/interface/lonnavmaps.pm 2008/11/18 20:18:37 1.416
+++ loncom/interface/lonnavmaps.pm 2008/12/04 08:56:28 1.419
@@ -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.419 2008/12/04 08:56:28 tempelho Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -425,31 +425,45 @@ manner:
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 @@ this.document.navform.submit();
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 @@ sub removeFromFilter {
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 @@ sub getLinkForResource {
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 @@ sub getDescription {
}
}
-# 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 @@ sub dueInLessThan24Hours {
$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 @@ sub lastTry {
$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) = @_;
@@ -975,8 +966,8 @@ sub render_resource {
# Is this the current resource?
if (!$params->{'displayedHereMarker'} &&
$resource->symb() eq $params->{'here'} ) {
- $curMarkerBegin = '>';
- $curMarkerEnd = '<';
+ $curMarkerBegin = '>';
+ $curMarkerEnd = '<';
$params->{'displayedHereMarker'} = 1;
}
@@ -1855,6 +1846,14 @@ ENDBLOCK
1;
+
+
+
+
+
+
+
+
package Apache::lonnavmaps::navmap;
=pod