version 1.31, 2005/11/22 00:01:41
|
version 1.32, 2006/03/15 19:41:26
|
Line 38 use Apache::lonlocal;
|
Line 38 use Apache::lonlocal;
|
use Apache::lonprintout; |
use Apache::lonprintout; |
use Apache::lonxml; |
use Apache::lonxml; |
|
|
|
sub error { |
|
my ($r,$msg) = @_; |
|
$r->print(&Apache::loncommon::endheadtag(). |
|
&Apache::loncommon::bodytag(). |
|
&mt($msg). |
|
&Apache::loncommon::end_page()); |
|
return OK; |
|
} |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
Line 46 sub handler {
|
Line 55 sub handler {
|
my $target=$env{'form.grade_target'}; |
my $target=$env{'form.grade_target'}; |
# ------------------------------------------------------------ Print the screen |
# ------------------------------------------------------------ Print the screen |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
|
my $html= |
my $html=&Apache::lonxml::xmlbegin(); |
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDDOCUMENT); |
$r->print(&Apache::lonxml::xmlbegin(). |
$html |
&Apache::loncommon::headtag()); |
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
ENDDOCUMENT |
|
} else { |
} else { |
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); |
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); |
} |
} |
Line 59 ENDDOCUMENT
|
Line 66 ENDDOCUMENT
|
# Is this even in a course? |
# Is this even in a course? |
unless ($env{'request.course.id'}) { |
unless ($env{'request.course.id'}) { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('</head><body>Not in a course</body></html>'); |
return &error($r,'Not in a course'); |
return OK; |
|
} else { |
} else { |
$r->print('\textbf{Not in a course}\end{document}'); |
$r->print('\textbf{Not in a course}\end{document}'); |
} |
} |
Line 79 ENDDOCUMENT
|
Line 85 ENDDOCUMENT
|
$namespace = 'grppage_'.$marker; |
$namespace = 'grppage_'.$marker; |
my %curr_groups; |
my %curr_groups; |
if (!&Apache::loncommon::coursegroups(\%curr_groups,$dom,$crs,$marker)) { |
if (!&Apache::loncommon::coursegroups(\%curr_groups,$dom,$crs,$marker)) { |
$r->print('<body>Invalid group name</body>'); |
return &error($r,'Invalid group name'); |
return OK; |
|
} |
} |
%groupinfo = &Apache::loncommon::get_group_settings($curr_groups{$marker}); |
%groupinfo = &Apache::loncommon::get_group_settings($curr_groups{$marker}); |
} else { |
} else { |
Line 88 ENDDOCUMENT
|
Line 93 ENDDOCUMENT
|
$namespace = 'smppage_'.$marker; |
$namespace = 'smppage_'.$marker; |
} |
} |
|
|
unless ($marker) { |
if (!$marker) { |
$r->print('<body>Invalid call</body>'); |
return &error($r,'Invalid call'); |
return OK; |
|
} |
} |
|
|
# --------------------------------------------------------- The syllabus fields |
# --------------------------------------------------------- The syllabus fields |
Line 130 ENDDOCUMENT
|
Line 134 ENDDOCUMENT
|
$title = 'Group Page'; |
$title = 'Group Page'; |
} |
} |
$r->print(&Apache::lonhtmlcommon::htmlareaheaders(). |
$r->print(&Apache::lonhtmlcommon::htmlareaheaders(). |
'</head>'.&Apache::loncommon::bodytag |
&Apache::loncommon::endheadtag(). |
($title,$forcestudent,$addentries,'',$dom,$env{'form.register'})); |
&Apache::loncommon::bodytag($title,$forcestudent,$addentries, |
|
'',$dom,$env{'form.register'})); |
} |
} |
|
|
if ($caller eq 'grppg') { |
if ($caller eq 'grppg') { |
Line 144 ENDDOCUMENT
|
Line 149 ENDDOCUMENT
|
} |
} |
} else { |
} else { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('</head><body>You do not currently have rights to |
$r->print(&Apache::loncommon::endheadtag(). |
view this group. |
&Apache::loncommon::bodytag(). |
</body></html>'); |
'You do not currently have rights to view this group.'. |
|
&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} else { |
} else { |
$r->print('\textbf{You do not currently have rights to view this group}\end{document}'); |
$r->print('\textbf{You do not currently have rights to view this group}\end{document}'); |
Line 302 ENDDOCUMENT
|
Line 308 ENDDOCUMENT
|
$r->print('<p>No page information provided.</p>'); |
$r->print('<p>No page information provided.</p>'); |
} |
} |
if ($env{'form.grade_target'} ne 'tex') { |
if ($env{'form.grade_target'} ne 'tex') { |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
$r->print('\end{document}'); |
$r->print('\end{document}'); |
} |
} |