--- loncom/xml/lonxml.pm 2013/05/05 00:10:16 1.539 +++ loncom/xml/lonxml.pm 2013/07/15 16:13:36 1.542 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.539 2013/05/05 00:10:16 raeburn Exp $ +# $Id: lonxml.pm,v 1.542 2013/07/15 16:13:36 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1535,6 +1535,7 @@ sub inserteditinfo { // ]]> FULLPAGE + my $textareaclass; if ($filetype eq 'html') { my $context; if ($env{'request.course.id'}) { @@ -1548,6 +1549,9 @@ FULLPAGE $uri,undef, "/public/$cdom/$cnum/syllabus"). "\n"; + if (&Apache::lonhtmlcommon::htmlareabrowser()) { + $textareaclass = 'class="LC_richDefaultOn"'; + } } } unless ($context eq 'syllabus') { @@ -1569,7 +1573,6 @@ FULLPAGE } my $titledisplay=&display_title(); - my $textareaclass; my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit', 'vi' => 'Save and View', 'dv' => 'Discard Edits and View', @@ -1585,13 +1588,15 @@ FULLPAGE $htmlerror=''.$htmlerror.''; } if (&Apache::lonhtmlcommon::htmlareabrowser()) { - $textareaclass = 'class="LC_richDefaultOff"'; + unless ($textareaclass) { + $textareaclass = 'class="LC_richDefaultOff"'; + } } } my $editfooter=(< -
+
$filename @@ -1691,6 +1696,19 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['todocs']); } + my ($cdom,$cnum); + if ($env{'request.course.id'}) { + $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + if ($filetype eq 'html') { + if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E.+$}) { + if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['editmode']); + } + } + } + } if ($filetype eq 'sty') { $breadcrumbtext = 'Style File Editor'; } elsif ($filetype eq 'js') { @@ -1793,7 +1811,7 @@ ENDNOTFOUND my $brcrum; if ($env{'request.state'} eq 'construct') { $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri), - 'text' => 'Construction Space'}, + 'text' => 'Authoring Space'}, {'href' => '', 'text' => $breadcrumbtext}]; } else { @@ -1820,13 +1838,16 @@ ENDNOTFOUND $displayfile=$request->uri; if ($request->uri =~ m{^/uploaded/}) { if ($env{'request.course.id'}) { - my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; - my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['folderpath','title']); } elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) { - $displayfile = &mt('Syllabus file: [_1]',$1); + my $filename = $1; + if ($1 eq 'loncapa.html') { + $displayfile = &mt('Syllabus (minimal template)'); + } else { + $displayfile = &mt('Syllabus file: [_1]',$1); + } $itemtitle = &mt('Syllabus'); } } @@ -1852,7 +1873,7 @@ ENDNOTFOUND if ($env{'request.state'} eq 'construct') { $options{'bread_crumbs'} = [{ 'href' => &Apache::loncommon::authorspace($request->uri), - 'text' => 'Construction Space'}, + 'text' => 'Authoring Space'}, {'href' => '', 'text' => $breadcrumbtext}]; $header = &Apache::loncommon::head_subbox( @@ -1887,7 +1908,7 @@ sub display_title { $title = substr($title, rindex($title, '/') + 1); } $result = ""; + .&mt('Authoring Space')."';"; } return $result; }