");
$("#LC_rt_"+id).click(editorHandler);
});
+ $.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/";
+ $(".colorchooser").jPicker();
+
+
});
';
+ # Code to put a due date countdown in 'duedatecountdown' span.
+ # This is currently located in the breadcrumb headers.
+ # note that the dueDateLayout is internatinoalized below.
+ # Here document is used to support the substitution into the javascript below.
+ # ..which unforunately necessitates escaping the $'s in the javascript.
+ # There are several times of importance
+ #
+ # serverDueDate - The absolute time at which the problem expires.
+ # serverTime - The server's time when the problem finished computing.
+ # clientTime - The client's time...as close to serverTime as possible.
+ # The clientTime will be slightly later due to
+ # 1. The latency between problem computation and
+ # the first network action.
+ # 2. The time required between the page load-start and the actual
+ # initial javascript execution that got clientTime.
+ # These are used as follows:
+ # The difference between clientTime and serverTime are used to
+ # correct for differences in clock settings between the browser's system and the
+ # server's.
+ #
+ # The difference between clientTime and the time at which the ready() method
+ # starts executing is used to estimate latencies for page load and submission.
+ # Since this is an estimate, it is doubled. The latency estimate + one minute
+ # is used to determine when the countdown timer turns red to warn the user
+ # to think about submitting.
+
+ my $dueDateLayout = '' . &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} - Submit early!') . '';
+ $output .= <
+ //
+
+";
+
+ return $js;
+}
+##
+# Sets the time at which the problem finished computing.
+# This just updates the serverTime and clientTime variables above.
+# Calling this in e.g. end_problem provides a better estimate of the
+# difference beetween the server and client time setting as
+# the difference contains less of the latency/problem compute time.
+#
+sub set_compute_end_time {
+
+ my $now = time()*1000; # Javascript times are in ms.
+ my $js = "
+
+
+";
+ return $js;
+
+}
+
############################################################
############################################################
@@ -1538,9 +1576,11 @@ returns: nothing
}
my $links;
if ((&show_return_link) && (!$CourseBreadcrumbs)) {
- $links=&htmltag( 'a',"",
+ my $alttext = &mt('Go Back');
+ $links=&htmltag( 'a',"",
{ href => '/adm/flip?postdata=return:',
title => &mt("Back to most recent content resource") });
+ $links=&htmltag('li',$links);
}
$links.= join "",
map {
@@ -1567,9 +1607,12 @@ returns: nothing
# last breadcrumb is the first order heading of a page
# for course breadcrumbs it's just bold
+
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1',
$lasttext), {title => $lasttext});
+ $links .= '
';
+
my $icons = '';
$faq = $last->{'faq'} if (exists($last->{'faq'}));
$bug = $last->{'bug'} if (exists($last->{'bug'}));
@@ -1587,6 +1630,7 @@ returns: nothing
$faq,$bug);
}
#
+
unless ($CourseBreadcrumbs) {
@@ -1595,12 +1639,14 @@ returns: nothing
$links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" });
}
+
if ($component) {
$links = &htmltag('span',
( $no_mt ? $component : mt($component) ).
( $icons ? $icons : '' ),
{ class => 'LC_breadcrumbs_component' } )
- .$links;
+ .$links
+;
}
&render_tools(\$links);
@@ -1611,7 +1657,12 @@ returns: nothing
# Return the @Crumbs stack to what we started with
push(@Crumbs,$last);
shift(@Crumbs);
+
+
# Return the breadcrumb's line
+
+
+
return "$links";
}
@@ -2077,26 +2128,41 @@ sub course_custom_roles {
sub resource_info_box {
- my ($symb,$onlyfolderflag)=@_;
+ my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)=@_;
my $return='';
+ if ($stuvcurrent ne '') {
+ $return = '
';
+ }
if ($symb) {
- $return=&Apache::loncommon::start_data_table();
+ $return.=&Apache::loncommon::start_data_table();
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symb);
my $folder=&Apache::lonnet::gettitle($map);
$return.=&Apache::loncommon::start_data_table_row().
- '