--- loncom/interface/lonhtmlcommon.pm 2002/07/25 21:23:51 1.4 +++ loncom/interface/lonhtmlcommon.pm 2002/08/30 15:35:08 1.9 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.4 2002/07/25 21:23:51 stredwic Exp $ +# $Id: lonhtmlcommon.pm,v 1.9 2002/08/30 15:35:08 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,16 +30,45 @@ package Apache::lonhtmlcommon; use strict; +sub AscendOrderOptions { + my ($order, $page, $formName)=@_; + + my $OpSel1 = ''; + my $OpSel2 = ''; + + if($order eq 'Ascending') { + $OpSel1 = ' selected'; + } else { + $OpSel2 = ' selected'; + } + + my $Str = ''; + $Str .= ''."\n"; + + return $Str; +} + sub MapOptions { - my ($data, $page)=@_; + my ($data, $page, $formName)=@_; my $Str = ''; $Str .= '{'orderedSequences'})) { + if($data->{$sequence.':title'} eq $map || $map eq 'All Maps') { + foreach my $problem (split(':', $data->{$sequence.':problems'})) { + $Str .= '{$page.'ProblemSelect'} eq + $data->{$problem.':title'}) { + $Str .= ' selected'; + $selected = 1; + } + $Str .= '>'.$data->{$problem.':title'}.''."\n"; + } + } + } + $Str .= '{$page.'PartSelect'} eq $part) { + $Str .= ' selected'; + $selected = 1; + } + $Str .= '>'.$part.''."\n"; + } + $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= '
'; - $Str .= '

Course: '; - $Str .= $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; - $Str .= '

'."\n"; - $Str .= ''; - $Str .= '
'."\n"; -# $Str .= '

Current Time: '.localtime(time).'




'."\n"; + foreach (@$sections) { + $Str .= ''."\n"; + } + $Str .= ''."\n"; return $Str; } -sub CreateStatisticsMainMenu { - my ($status, $reports)=@_; +sub Title { + my ($pageName)=@_; my $Str = ''; - $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= ''."\n"; - $Str .= ''."\n"; - - $Str .= ''."\n"; - - $Str .= '
Analysis Reports:Student Status:
{'reportSelected'} eq $reports->{$_}) { - $Str .= ' selected=""'; - } - $Str .= '>'.$reports->{$_}.''."\n"; - } - $Str .= ''; - $Str .= &StatusOptions($status, 'Statistics'); - $Str .= '
'."\n"; - $Str .= '
'."\n"; + $Str .= ''.$pageName.''."\n"; + $Str .= &Apache::loncommon::bodytag($pageName)."\n"; + $Str .= ''."\n"; return $Str; } @@ -284,5 +358,37 @@ sub FormatStudentInformation { return $Str; } +# Create progress +sub Create_PrgWin { + my ($r, $title, $heading)=@_; + $r->print('"); + + $r->rflush(); +} + +# update progress +sub Update_PrgWin { + my ($displayString,$r)=@_; + $r->print(''); + $r->rflush(); +} + +# close Progress Line +sub Close_PrgWin { + my ($r)=@_; + $r->print(''."\n"); + $r->rflush(); +} + 1; __END__