version 1.150, 2012/11/08 18:37:44
|
version 1.155, 2013/09/17 15:04:30
|
Line 78 use Apache::Constants qw(:common);
|
Line 78 use Apache::Constants qw(:common);
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lontexconvert; |
use Apache::lontexconvert; |
use Apache::lonfeedback; |
use Apache::lonhtmlgateway; |
use Apache::lonrss(); |
use Apache::lonrss(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonmsgdisplay(); |
use Apache::lonmsgdisplay(); |
Line 139 sub handler {
|
Line 139 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','todocs', |
'register','popup']); |
'register','popup','folderpath','title']); |
|
|
# ----------------------------------------------- Available Portfolio file display |
# ----------------------------------------------- Available Portfolio file display |
if (($target ne 'tex') && ($action eq 'portfolio')) { |
if (($target ne 'tex') && ($action eq 'portfolio')) { |
&display_portfolio_header($r,$is_course); |
&display_portfolio_header($r,$is_course); |
Line 220 sub handler {
|
Line 219 sub handler {
|
if ($env{'form.popup'}) { # Don't show breadcrumbs in popup window |
if ($env{'form.popup'}) { # Don't show breadcrumbs in popup window |
$args->{'no_nav_bar'} = 1; |
$args->{'no_nav_bar'} = 1; |
} elsif (!$env{'form.register'}) { #Don't show breadcrumbs twice, when this page is part of course content and you call it |
} elsif (!$env{'form.register'}) { #Don't show breadcrumbs twice, when this page is part of course content and you call it |
$args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme", |
if (($env{'request.course.id'}) && |
text=>"Personal Information Page"}]; |
($env{'form.folderpath'} =~ /^supplemental/)) { |
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $title = $env{'form.title'}; |
|
if ($title eq '') { |
|
$title = &mt('Personal Information Page'); |
|
} |
|
my $brcrum = |
|
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
|
if (ref($brcrum) eq 'ARRAY') { |
|
$args->{'bread_crumbs'} = $brcrum; |
|
} |
|
} else { |
|
$args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme", |
|
text=>"Personal Information Page"}]; |
|
} |
} |
} |
my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args); |
my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args); |
$r->print($start_page); |
$r->print($start_page); |
Line 299 sub handler {
|
Line 312 sub handler {
|
if (($allowed) && ($env{'form.storesyl'})) { |
if (($allowed) && ($env{'form.storesyl'})) { |
foreach my $syl_field (keys(%syllabusfields)) { |
foreach my $syl_field (keys(%syllabusfields)) { |
my $field=$env{'form.'.$syl_field}; |
my $field=$env{'form.'.$syl_field}; |
$field=~s/\s+$//s; |
chomp($field); |
$field=&Apache::lonfeedback::clear_out_html($field,$env{'user.adv'}); |
my $gateway = Apache::lonhtmlgateway->new(); |
|
$field = $gateway->process_incoming_html($field,1); |
$syllabus{$syl_field}=$field; |
$syllabus{$syl_field}=$field; |
} |
} |
$syllabus{'uploaded.lastmodified'}=time; |
$syllabus{'uploaded.lastmodified'}=time; |
Line 374 sub handler {
|
Line 388 sub handler {
|
|
|
if ($env{'request.course.id'} |
if ($env{'request.course.id'} |
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
&& &Apache::lonnet::in_course($cdom,$cnum)) { |
&& &Apache::lonnet::in_course($cdom,$cnum,$coursedomain,$coursenum,undef,1)) { |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('<a name="coursecomment" />'); |
$r->print('<a name="coursecomment" />'); |
&Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_Box'); |
&Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_Box'); |
Line 392 sub handler {
|
Line 406 sub handler {
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('</div>'); |
$r->print('</div>'); |
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></p>'); |
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
Line 787 sub aboutme_access {
|
Line 801 sub aboutme_access {
|
} |
} |
if ((&Apache::lonnet::allowed('srm',$privcheck)) || |
if ((&Apache::lonnet::allowed('srm',$privcheck)) || |
(&Apache::lonnet::allowed('dff',$privcheck))) { |
(&Apache::lonnet::allowed('dff',$privcheck))) { |
if (&Apache::lonnet::in_course($uname,$udom,$cnum,$cdom)) { |
if (&Apache::lonnet::in_course($uname,$udom,$cnum,$cdom,undef,1)) { |
return 1; |
return 1; |
} |
} |
} |
} |