version 1.85, 2008/12/15 16:37:44
|
version 1.87, 2008/12/17 00:44:53
|
Line 230 sub handler {
|
Line 230 sub handler {
|
my $privleged=$allowed=(($env{'user.name'} eq $cnum) && |
my $privleged=$allowed=(($env{'user.name'} eq $cnum) && |
($env{'user.domain'} eq $cdom)); |
($env{'user.domain'} eq $cdom)); |
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
|
my $query_string; |
if ($allowed) { |
if ($allowed) { |
my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}}); |
$query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}}); |
$r->print('<p><b>'.&mt('Privacy Note').':</b> '. |
$r->print('<p><b>'.&mt('Privacy Note').':</b> '. |
&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.'). |
&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.'). |
'</p>'. |
'</p><p><a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'</p><p><a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'</p>'); |
} elsif ($privleged && $target ne 'tex') { |
} elsif ($privleged && $target ne 'tex') { |
my $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}}); |
$query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}}); |
$r->print('<p><a href="'.$r->uri.$query_string.'">'. |
$r->print('<p><a href="'.$r->uri.$query_string.'">'. |
&mt('Edit').'</a></p>'); |
&mt('Edit').'</a></p>'); |
} |
} |
Line 280 my $image;
|
Line 280 my $image;
|
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { |
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { |
$lastmod=$syllabus{'uploaded.lastmodified'}; |
$lastmod=$syllabus{'uploaded.lastmodified'}; |
$lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); |
$lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); |
# $r->print(&mt('Last updated').': '.$lastmod); #Old Last Modifi Pos |
$r->print('<br />'.&mt('Last updated').': '.$lastmod); |
if ($syllabus{'uploaded.photourl'}) { |
if ($syllabus{'uploaded.photourl'}) { |
&Apache::lonnet::allowuploaded('/adm/aboutme', |
&Apache::lonnet::allowuploaded('/adm/aboutme', |
$syllabus{'uploaded.photourl'}); |
$syllabus{'uploaded.photourl'}); |
Line 302 my $image;
|
Line 302 my $image;
|
'); |
'); |
|
|
} |
} |
|
|
|
if($allowed) { |
|
$r->print('<form method="post">'); |
|
} |
|
|
&Apache::lontemplate::start_columnSection($r); |
&Apache::lontemplate::start_columnSection($r); |
&Apache::lontemplate::print_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); |
&Apache::lontemplate::print_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); |
if($target ne 'tex') |
if($target ne 'tex') |
Line 311 my $image;
|
Line 316 my $image;
|
&Apache::lontemplate::send_message($r,$cnum,$cdom); |
&Apache::lontemplate::send_message($r,$cnum,$cdom); |
&Apache::lontemplate::end_ContentBox($r); |
&Apache::lontemplate::end_ContentBox($r); |
&Apache::lontemplate::end_columnSection($r); |
&Apache::lontemplate::end_columnSection($r); |
|
|
&Apache::lontemplate::start_columnSection($r); |
&Apache::lontemplate::start_columnSection($r); |
&Apache::lontemplate::start_ContentBox($r); |
&Apache::lontemplate::start_ContentBox($r); |
&print_portfiles_link($r,$is_course); |
&print_portfiles_link($r,$is_course); |
Line 322 my $image;
|
Line 328 my $image;
|
} |
} |
&Apache::lontemplate::end_ContentBox($r); |
&Apache::lontemplate::end_ContentBox($r); |
&Apache::lontemplate::end_columnSection($r); |
&Apache::lontemplate::end_columnSection($r); |
|
if($allowed){ |
|
$r->print('<p><a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'. |
|
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
|
} |
} |
} |
|
|
if ($allowed) { |
if ($allowed) { |
if ($env{'form.popup'}) { |
if ($env{'form.popup'}) { |
$r->print('<input type="hidden" name="popup" value="'. |
$r->print('<input type="hidden" name="popup" value="'. |
Line 372 my $image;
|
Line 381 my $image;
|
if ($env{'form.popup'}) { |
if ($env{'form.popup'}) { |
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>'); |
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>'); |
} |
} |
$r->print('<br />'.&mt('Last updated').': '.$lastmod); |
|
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
$r->print('\end{document}'); |
$r->print('\end{document}'); |