version 1.7, 2002/08/13 00:37:18
|
version 1.9, 2002/08/30 15:35:08
|
Line 85 sub MapOptions {
|
Line 85 sub MapOptions {
|
return $Str; |
return $Str; |
} |
} |
|
|
|
sub ProblemOptions { |
|
my ($data, $page, $map, $formName)=@_; |
|
my $Str = ''; |
|
$Str .= '<select name="'; |
|
$Str .= (($page)?$page:'').'ProblemSelect"'; |
|
if($formName) { |
|
$Str .= ' onchange="document.'.$formName.'.submit()"'; |
|
} |
|
$Str .= '>'."\n"; |
|
|
|
my $selected = 0; |
|
foreach my $sequence (split(':',$data->{'orderedSequences'})) { |
|
if($data->{$sequence.':title'} eq $map || $map eq 'All Maps') { |
|
foreach my $problem (split(':', $data->{$sequence.':problems'})) { |
|
$Str .= '<option'; |
|
if($data->{$page.'ProblemSelect'} eq |
|
$data->{$problem.':title'}) { |
|
$Str .= ' selected'; |
|
$selected = 1; |
|
} |
|
$Str .= '>'.$data->{$problem.':title'}.'</option>'."\n"; |
|
} |
|
} |
|
} |
|
$Str .= '<option'; |
|
if(!$selected) { |
|
$Str .= ' selected'; |
|
} |
|
$Str .= '>All Problems</option>'."\n"; |
|
|
|
$Str .= '</select>'."\n"; |
|
|
|
return $Str; |
|
} |
|
|
|
sub PartOptions { |
|
my ($data, $page, $parts, $formName)=@_; |
|
my $Str = ''; |
|
|
|
if(!defined($parts)) { |
|
return ''; |
|
} |
|
|
|
$Str .= '<select name="'; |
|
$Str .= (($page)?$page:'').'PartSelect"'; |
|
if($formName) { |
|
$Str .= ' onchange="document.'.$formName.'.submit()"'; |
|
} |
|
$Str .= '>'."\n"; |
|
|
|
my $selected = 0; |
|
foreach my $part (@$parts) { |
|
$Str .= '<option'; |
|
if($data->{$page.'PartSelect'} eq $part) { |
|
$Str .= ' selected'; |
|
$selected = 1; |
|
} |
|
$Str .= '>'.$part.'</option>'."\n"; |
|
} |
|
$Str .= '<option'; |
|
if(!$selected) { |
|
$Str .= ' selected'; |
|
} |
|
$Str .= '>All Parts</option>'."\n"; |
|
|
|
$Str .= '</select>'."\n"; |
|
|
|
return $Str; |
|
} |
|
|
sub StudentOptions { |
sub StudentOptions { |
my ($cache, $students, $selectedName, $page, $formName)=@_; |
my ($cache, $students, $selectedName, $page, $formName)=@_; |
|
|
Line 175 sub Title {
|
Line 245 sub Title {
|
my $Str = ''; |
my $Str = ''; |
|
|
$Str .= '<html><head><title>'.$pageName.'</title></head>'."\n"; |
$Str .= '<html><head><title>'.$pageName.'</title></head>'."\n"; |
$Str .= '<body bgcolor="#FFFFFF">'."\n"; |
$Str .= &Apache::loncommon::bodytag($pageName)."\n"; |
$Str .= '<script>window.focus(); window.width=500;window.height=500;'; |
$Str .= '<script>window.focus(); window.width=500;window.height=500;'; |
$Str .= '</script>'."\n"; |
$Str .= '</script>'."\n"; |
$Str .= '<table width="100%"><tr><td valign="top">'; |
|
$Str .= '<h1> Course: '; |
|
$Str .= $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
|
$Str .= '</h1></td><td align="right">'."\n"; |
|
$Str .= '<img align="right" src=/adm/lonIcons/lonlogos.gif>'; |
|
$Str .= '</td></tr></table>'."\n"; |
|
|
|
return $Str; |
return $Str; |
} |
} |