version 1.375, 2006/04/10 19:59:53
|
version 1.377, 2006/04/10 21:55:48
|
Line 207 ENDSUBM
|
Line 207 ENDSUBM
|
{'only_body' => 1, |
{'only_body' => 1, |
'bgcolor' => '#FFFFFF', |
'bgcolor' => '#FFFFFF', |
'add_entries' => |
'add_entries' => |
'onLoad="submitthis()"',}). |
{'onload' => |
|
"submitthis()"}}). |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
|
|
return OK; |
return OK; |
Line 317 MENU
|
Line 318 MENU
|
"Close navigation window"); |
"Close navigation window"); |
} |
} |
|
|
my $jumpToFirstHomework = 0; |
|
# Check to see if the student is jumping to next open, do-able problem |
# Check to see if the student is jumping to next open, do-able problem |
if ($ENV{QUERY_STRING} =~ /^jumpToFirstHomework/) { |
if ($ENV{QUERY_STRING} =~ /^jumpToFirstHomework/) { |
$jumpToFirstHomework = 1; |
|
# Find the next homework problem that they can do. |
# Find the next homework problem that they can do. |
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
my $curRes; |
my $curRes; |
my $foundDoableProblem = 0; |
my $foundDoableProblem = 0; |
my $problemRes; |
my $minimumduedate; |
|
|
while (($curRes = $iterator->next()) && !$foundDoableProblem) { |
while ($curRes = $iterator->next()) { |
if (ref($curRes) && $curRes->is_problem()) { |
if (ref($curRes) && $curRes->is_problem()) { |
my $status = $curRes->status(); |
my $status = $curRes->status(); |
if ($curRes->completable()) { |
if ($curRes->completable()) { |
$problemRes = $curRes; |
my $thisduedate=$curRes->duedate(); |
|
unless ($foundDoableProblem) { |
|
$minimumduedate=$thisduedate; |
|
} |
|
|
$foundDoableProblem = 1; |
$foundDoableProblem = 1; |
|
|
# Pop open all previous maps |
if ($thisduedate<=$minimumduedate) { |
my $stack = $iterator->getStack(); |
# Pop open all previous maps |
pop @$stack; # last resource in the stack is the problem |
my $stack = $iterator->getStack(); |
# itself, which we don't need in the map stack |
pop @$stack; # last resource in the stack is the problem |
my @mapPcs = map {$_->map_pc()} @$stack; |
# itself, which we don't need in the map stack |
$env{'form.filter'} = join(',', @mapPcs); |
my @mapPcs = map {$_->map_pc()} @$stack; |
|
$env{'form.filter'} = join(',', @mapPcs); |
# Mark as both "here" and "jump" |
|
$env{'form.postsymb'} = $curRes->symb(); |
# Mark as both "here" and "jump" |
|
$env{'form.postsymb'} = $curRes->symb(); |
|
$minimumduedate=$thisduedate; |
|
} |
} |
} |
} |
} |
} |
} |
Line 354 MENU
|
Line 361 MENU
|
} else { |
} else { |
&add_linkitem(\%toplinkitems,'firsthomework', |
&add_linkitem(\%toplinkitems,'firsthomework', |
'location.href="navmaps?jumpToFirstHomework"', |
'location.href="navmaps?jumpToFirstHomework"', |
"Show Me My First Homework Problem"); |
"Show my first due problem"); |
} |
} |
|
|
my $suppressEmptySequences = 0; |
my $suppressEmptySequences = 0; |
Line 371 MENU
|
Line 378 MENU
|
}; |
}; |
&add_linkitem(\%toplinkitems,'everything', |
&add_linkitem(\%toplinkitems,'everything', |
'location.href="navmaps?sort='.$env{'form.sort'}.'"', |
'location.href="navmaps?sort='.$env{'form.sort'}.'"', |
"Show Everything"); |
"Show everything"); |
$r->print("<p><font size='+2'>".&mt("Uncompleted Homework")."</font></p>"); |
$r->print("<p><font size='+2'>".&mt("Uncompleted Problems")."</font></p>"); |
$env{'form.filter'} = ''; |
$env{'form.filter'} = ''; |
$env{'form.condition'} = 1; |
$env{'form.condition'} = 1; |
$resource_no_folder_link = 1; |
$resource_no_folder_link = 1; |
Line 380 MENU
|
Line 387 MENU
|
&add_linkitem(\%toplinkitems,'uncompleted', |
&add_linkitem(\%toplinkitems,'uncompleted', |
'location.href="navmaps?sort='.$env{'form.sort'}. |
'location.href="navmaps?sort='.$env{'form.sort'}. |
'&showOnlyHomework=1"', |
'&showOnlyHomework=1"', |
"Show Only Uncompleted Homework"); |
"Show only uncompleted problems"); |
} |
} |
|
|
my %selected=($env{'form.sort'} => 'selected=on'); |
my %selected=($env{'form.sort'} => 'selected=on'); |
Line 1602 sub render {
|
Line 1609 sub render {
|
if ($condition) { |
if ($condition) { |
$link='"navmaps?condition=0&filter=&'.$queryString. |
$link='"navmaps?condition=0&filter=&'.$queryString. |
'&here='.&Apache::lonnet::escape($here).'"'; |
'&here='.&Apache::lonnet::escape($here).'"'; |
$text='Close All Folders'; |
$text='Close all folders'; |
} else { |
} else { |
$link='"navmaps?condition=1&filter=&'.$queryString. |
$link='"navmaps?condition=1&filter=&'.$queryString. |
'&here='.&Apache::lonnet::escape($here).'"'; |
'&here='.&Apache::lonnet::escape($here).'"'; |
$text='Open All Folders'; |
$text='Open all folders'; |
} |
} |
if ($args->{'caller'} eq 'navmapsdisplay') { |
if ($args->{'caller'} eq 'navmapsdisplay') { |
&add_linkitem($args->{'linkitems'},'changefolder', |
&add_linkitem($args->{'linkitems'},'changefolder', |