version 1.66, 2008/01/16 12:19:39
|
version 1.70, 2008/09/11 02:07:27
|
Line 69 sub handler {
|
Line 69 sub handler {
|
# ------------------------------------------------------------ Get Query String |
# ------------------------------------------------------------ Get Query String |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['forceedit','forcestudent', |
['forceedit','forcestudent', |
'register']); |
'register','popup']); |
|
|
# ----------------------------------------------- Available Portfolio file display |
# ----------------------------------------------- Available Portfolio file display |
if (($target ne 'tex') && ($action eq 'portfolio')) { |
if (($target ne 'tex') && ($action eq 'portfolio')) { |
Line 115 sub handler {
|
Line 115 sub handler {
|
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); |
my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); |
|
my $args = {'function' => $forcestudent, |
|
'domain' => $cdom, |
|
'force_register' => $forceregister}; |
|
if ($env{'form.popup'}) { |
|
$args->{'no_nav_bar'} = 1; |
|
} |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page("Personal Information", $rss_link, |
&Apache::loncommon::start_page("Personal Information",$rss_link,$args); |
{'function' => $forcestudent, |
|
'domain' => $cdom, |
|
'force_register' => |
|
$forceregister,}); |
|
$r->print($start_page); |
$r->print($start_page); |
$r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>'); |
$r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>'); |
} else { |
} else { |
Line 147 sub handler {
|
Line 149 sub handler {
|
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
if ($forcestudent or $target eq 'tex') { $allowed=0; } |
|
|
if ($allowed) { |
if ($allowed) { |
my $query_string = &build_query_string({'forcestudent' => '1',}); |
my $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>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','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_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>'); |
} elsif ($privleged && $target ne 'tex') { |
} elsif ($privleged && $target ne 'tex') { |
my $query_string = &build_query_string({'forceedit' => '1',}); |
my $query_string = &build_query_string({'forceedit' => '1','popup' => $env{'form.popup'}}); |
$r->print('<p><a href="'.$r->uri.$query_string.'"><font size="+1">'. |
$r->print('<p><a href="'.$r->uri.$query_string.'"><font size="+1">'. |
&mt('Edit').'</font></a></p>'); |
&mt('Edit').'</font></a></p>'); |
} |
} |
Line 211 sub handler {
|
Line 213 sub handler {
|
</form>'. |
</form>'. |
'<form method="post" enctype="multipart/form-data">'. |
'<form method="post" enctype="multipart/form-data">'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<input type="file" name="uploaddoc" size="50">'. |
'<input type="file" name="uploaddoc" size="50" />'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'">'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'. |
|
'<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'. |
'</form><form method="post">'); |
'</form><form method="post">'); |
|
|
} |
} |
Line 242 sub handler {
|
Line 245 sub handler {
|
} |
} |
} |
} |
if ($allowed) { |
if ($allowed) { |
|
if ($env{'form.popup'}) { |
|
$r->print('<input type="hidden" name="popup" value="'. |
|
$env{'form.popup'}.'" />'); |
|
} |
$r->print('</form>'); |
$r->print('</form>'); |
} |
} |
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
Line 281 sub handler {
|
Line 288 sub handler {
|
} |
} |
} |
} |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
|
if ($env{'form.popup'}) { |
|
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>'); |
|
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
$r->print('\end{document}'); |
$r->print('\end{document}'); |
Line 610 sub parse_directory {
|
Line 620 sub parse_directory {
|
|
|
my $portfolio_root = &Apache::portfolio::get_portfolio_root($cdom,$cnum, |
my $portfolio_root = &Apache::portfolio::get_portfolio_root($cdom,$cnum, |
$group); |
$group); |
|
my $getpropath = 1; |
my %dirlist = map { |
my %dirlist = map { |
((split('&',$_,2))[0],1) |
((split('&',$_,2))[0],1) |
} &Apache::lonnet::dirlist($path,$cdom,$cnum,$portfolio_root); |
} &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath); |
foreach my $item (sort(keys(%{$currhash}))) { |
foreach my $item (sort(keys(%{$currhash}))) { |
$output .= &portfolio_row_start(); |
$output .= &portfolio_row_start(); |
$output .= '<td style="padding-left: '.($depth*25).'px">'; |
$output .= '<td style="padding-left: '.($depth*25).'px">'; |