version 1.71, 2009/02/24 18:20:49
|
version 1.72, 2009/02/25 13:25:52
|
Line 214 sub handler {
|
Line 214 sub handler {
|
} |
} |
|
|
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
|
|
if ($allowed) { |
|
$r->print('<p>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')) .'</p>'); |
|
} |
|
if (($env{'form.uploaddoc.filename'} and $target ne 'tex') && |
if (($env{'form.uploaddoc.filename'} and $target ne 'tex') && |
($env{'form.storeupl'}) && ($allowed)) { |
($env{'form.storeupl'}) && ($allowed)) { |
if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) { |
if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) { |
Line 256 sub handler {
|
Line 253 sub handler {
|
&Apache::lonnet::put($db_name,\%syllabus,$dom,$crs); |
&Apache::lonnet::put($db_name,\%syllabus,$dom,$crs); |
} |
} |
|
|
# ---------------------------------------------------------------- Get syllabus |
#---Print Function |
if ((($syllabus{'uploaded.lastmodified'}) && |
|
(($group ne '' && ($group_home_view || $group_edit_perm || |
|
$group_view_perm)) || ($group eq ''))) || ($allowed)) { |
|
my $image; |
|
if ($syllabus{'uploaded.photourl'}) { |
|
&Apache::lonnet::allowuploaded('/adm/smppg', |
|
$syllabus{'uploaded.photourl'}); |
|
|
|
$image='<img src="'.$syllabus{'uploaded.photourl'}.'" |
|
/>'; |
|
if ($target eq 'tex') { |
|
$image=&Apache::lonxml::xmlparse($r,'tex',$image); |
|
} |
|
} |
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |
if($allowed || $privileged){ |
if($allowed || $privileged){ |
&Apache::lontemplate::print_start_page_functions($r); |
&Apache::lontemplate::print_start_page_functions($r); |
if($allowed){ |
if($allowed){ |
&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'. |
&Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')); |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')); |
&Apache::lontemplate::print_functions_content($r,&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes'))); |
}elsif($privileged){ |
}elsif($privileged){ |
my $edittext = &mt('Edit'); |
my $edittext = &mt('Edit'); |
if ($group ne '') { |
if ($group ne '') { |
Line 295 sub handler {
|
Line 278 sub handler {
|
&Apache::lontemplate::print_end_page_functions($r); |
&Apache::lontemplate::print_end_page_functions($r); |
} |
} |
} |
} |
|
|
|
# ---------------------------------------------------------------- Get syllabus |
|
if ((($syllabus{'uploaded.lastmodified'}) && |
|
(($group ne '' && ($group_home_view || $group_edit_perm || |
|
$group_view_perm)) || ($group eq ''))) || ($allowed)) { |
|
my $image; |
|
if ($syllabus{'uploaded.photourl'}) { |
|
&Apache::lonnet::allowuploaded('/adm/smppg', |
|
$syllabus{'uploaded.photourl'}); |
|
|
|
$image='<img src="'.$syllabus{'uploaded.photourl'}.'" |
|
/>'; |
|
if ($target eq 'tex') { |
|
$image=&Apache::lonxml::xmlparse($r,'tex',$image); |
|
} |
|
} |
|
|
if ($allowed) { |
if ($allowed) { |
$r->print( |
$r->print( |
'<form method="post" enctype="multipart/form-data">'. |
'<form method="post" enctype="multipart/form-data">'. |