version 1.313, 2012/05/09 19:46:30
|
version 1.314, 2012/05/28 13:09:17
|
Line 1370 sub htmlareaselectactive {
|
Line 1370 sub htmlareaselectactive {
|
# is used to determine when the countdown timer turns red to warn the user |
# is used to determine when the countdown timer turns red to warn the user |
# to think about submitting. |
# to think about submitting. |
|
|
my $dueDateLayout = '<b>' . &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} - Submit early!') . '</b>'; |
my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]',"<span id='submitearly'></span>"); |
|
my $early = '- <b>'.&mt('Submit Early').'</b>'; |
|
my $pastdue = '- <b>'.&mt('Past Due').'</b>'; |
$output .= <<JAVASCRIPT; |
$output .= <<JAVASCRIPT; |
|
|
var documentReadyTime; |
var documentReadyTime; |
Line 1382 sub htmlareaselectactive {
|
Line 1384 sub htmlareaselectactive {
|
layout: "$dueDateLayout", |
layout: "$dueDateLayout", |
onTick: function (periods) { |
onTick: function (periods) { |
var latencyEstimate = (documentReadyTime - clientTime) * 2; |
var latencyEstimate = (documentReadyTime - clientTime) * 2; |
|
if(\$.countdown.periodsToSeconds(periods) < (300 + latencyEstimate)) { |
|
\$("#submitearly").html("$early"); |
|
if (\$.countdown.periodsToSeconds(periods) < 1) { |
|
\$("#submitearly").html("$pastdue"); |
|
} |
|
} |
if(\$.countdown.periodsToSeconds(periods) < (60 + latencyEstimate)) { |
if(\$.countdown.periodsToSeconds(periods) < (60 + latencyEstimate)) { |
\$(this).css("color", "red"); //Highlight last minute. |
\$(this).css("color", "red"); //Highlight last minute. |
} |
} |
Line 1568 returns: nothing
|
Line 1576 returns: nothing
|
my %tools = (); |
my %tools = (); |
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, $CourseBreadcrumbs) = @_; |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, |
|
$CourseBreadcrumbs) = @_; |
# |
# |
$css_class ||= 'LC_breadcrumbs'; |
$css_class ||= 'LC_breadcrumbs'; |
|
|
Line 1643 returns: nothing
|
Line 1652 returns: nothing
|
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
$lasttext), {title => $lasttext}); |
$lasttext), {title => $lasttext}); |
|
|
unless ($CourseBreadcrumbs) { |
|
$links .= '<li> <span id="duedatecountdown"></span></li>'; |
|
} |
|
|
|
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
Line 1724 Currently there are 3 possible values fo
|
Line 1729 Currently there are 3 possible values fo
|
left of breadcrumbs line |
left of breadcrumbs line |
|
|
=item tools |
=item tools |
right of breadcrumbs line |
remaining items in right of breadcrumbs line |
|
|
=item advtools |
=item advtools |
advanced tools shown in a separate box below breadcrumbs line |
advanced tools shown in a separate box below breadcrumbs line |