version 1.28, 2004/05/03 17:36:47
|
version 1.32, 2004/06/02 00:42:15
|
Line 36 use Apache::lontexconvert;
|
Line 36 use Apache::lontexconvert;
|
use Apache::lonfeedback; |
use Apache::lonfeedback; |
use Apache::lonannounce; |
use Apache::lonannounce; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::lonhtmlcommon; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 45 sub handler {
|
Line 46 sub handler {
|
|
|
# ------------------------------------------------------------ Print the screen |
# ------------------------------------------------------------ Print the screen |
my $target=$ENV{'form.grade_target'}; |
my $target=$ENV{'form.grade_target'}; |
&Apache::lonnet::logthis("NOW TARGET IS DEFINIED AS $target"); |
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
Line 99 ENDDOCUMENT
|
Line 99 ENDDOCUMENT
|
# ------------------------------------- There is such a course, get environment |
# ------------------------------------- There is such a course, get environment |
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('</head>'.&Apache::loncommon::bodytag |
$r->print(&Apache::lonhtmlcommon::htmlareaheaders(). |
|
'</head>'.&Apache::loncommon::bodytag |
("Syllabus",$forcestudent,$addentries,'',$cdom,$ENV{'form.register'})); |
("Syllabus",$forcestudent,$addentries,'',$cdom,$ENV{'form.register'})); |
$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'. |
$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'. |
$Apache::lonnet::domaindescription{$cdom}.'</h3>'); |
$Apache::lonnet::domaindescription{$cdom}.'</h3>'); |
} else { |
} else { |
$r->print('\noindent\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'. |
$r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'. |
$Apache::lonnet::domaindescription{$cdom}.'}\\\\'); |
$Apache::lonnet::domaindescription{$cdom}.'}\\\\'); |
} |
} |
# -------------------------------------------------------------- Announcements? |
# -------------------------------------------------------------- Announcements? |
Line 160 ENDDOCUMENT
|
Line 161 ENDDOCUMENT
|
if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) { |
if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) { |
$forcestudent='student'; |
$forcestudent='student'; |
} |
} |
if ($forcestudent) { $allowed=0; } |
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
} |
} |
if ($allowed) { |
if ($allowed) { |
$r->print('<p>'. |
$r->print('<p>'. |
Line 240 ENDDOCUMENT
|
Line 241 ENDDOCUMENT
|
'<input type="hidden" name="forceedit" value="edit" />'); |
'<input type="hidden" name="forceedit" value="edit" />'); |
} |
} |
foreach (sort keys %syllabusfields) { |
foreach (sort keys %syllabusfields) { |
if (($syllabus{$_}) || ($allowed)) { |
if (($syllabus{$_}=~/\w/) || ($allowed)) { |
my $message=$syllabus{$_}; |
my $message=$syllabus{$_}; |
if ($_ eq 'lll_includeurl') { # this is the "included" field |
if ($_ eq 'lll_includeurl') { # this is the "included" field |
my $urls=$message; |
my $urls=$message; |
Line 277 ENDDOCUMENT
|
Line 278 ENDDOCUMENT
|
$message.'</blockquote>'); |
$message.'</blockquote>'); |
} else { |
} else { |
$r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\'. |
$r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\'. |
&Apache::lonxml::xmlparse($r,' ',$message).'\\\\'); |
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\'); |
} |
} |
} |
} |
if ($allowed) { |
if ($allowed) { |
Line 288 ENDDOCUMENT
|
Line 289 ENDDOCUMENT
|
} |
} |
} |
} |
if ($allowed) { |
if ($allowed) { |
$r->print('</form>'); |
$r->print('</form>'. |
|
&Apache::lonhtmlcommon::htmlareaactive()); |
} |
} |
if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');} |
if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');} |
} else { |
} else { |