version 1.439, 2012/04/16 19:46:14
|
version 1.442, 2013/01/04 05:30:52
|
Line 599 sub start_body {
|
Line 599 sub start_body {
|
$header=&Apache::lonmenu::constspaceform(); |
$header=&Apache::lonmenu::constspaceform(); |
} |
} |
if ($env{'request.state'} ne 'published') { |
if ($env{'request.state'} ne 'published') { |
$header.=&Apache::londefdef::edit_controls(); |
$header.=&edit_controls(); |
} |
} |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$currentstring.=&Apache::loncommon::head_subbox( |
$currentstring.=&Apache::loncommon::head_subbox( |
Line 633 sub edit_controls {
|
Line 633 sub edit_controls {
|
if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { |
if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { |
my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'}); |
my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'}); |
if ($url =~ /\.html?$/i) { |
if ($url =~ /\.html?$/i) { |
|
if ($env{'request.course.id'}) { |
|
if ($env{'request.filename'} =~ m{/userfiles/supplemental/default|\d+/}) { |
|
if (&Apache::lonnet::is_course_upload($env{'request.filename'}, |
|
$env{'course.'.$env{'request.course.id'}.'.num'}, |
|
$env{'course.'.$env{'request.course.id'}.'.domain'})) { |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['folderpath','title']); |
|
} |
|
} |
|
} |
my ($symb,$itemtitle,$displayfile) = |
my ($symb,$itemtitle,$displayfile) = |
&Apache::lonxml::get_courseupload_hierarchy($url); |
&Apache::lonxml::get_courseupload_hierarchy($url, |
if ($symb ne '') { |
$env{'form.folderpath'}, |
|
$env{'form.title'}); |
|
if (($symb ne '') || ($env{'httpref.'.$url} ne '')) { |
$result .= (' ' x 3). |
$result .= (' ' x 3). |
&Apache::lonhtmlcommon::dependencies_button()."\n". |
&Apache::lonhtmlcommon::dependencies_button()."\n". |
&Apache::lonhtmlcommon::dependencycheck_js($symb,$itemtitle)."\n"; |
&Apache::lonhtmlcommon::dependencycheck_js($symb, |
|
$itemtitle,$url,$env{'form.folderpath'},$url)."\n"; |
} |
} |
} |
} |
my $viewtext = &mt('Course View'); |
|
if (&Apache::loncommon::course_type() eq 'Community') { |
|
$viewtext = &mt('Community View'); |
|
} |
|
$result .= (' ' x 3).'<input type="button" value="'. |
|
$viewtext.'" onclick="javascript:location.href=currentURL" />'; |
|
} |
} |
$result .= '</div> |
$result .= '</div> |
</div> |
</div> |
Line 4476 sub latex_header {
|
Line 4483 sub latex_header {
|
"\\usepackage{xcolor}\n". |
"\\usepackage{xcolor}\n". |
'\usepackage{calc}'. |
'\usepackage{calc}'. |
'\usepackage{amsmath}'. |
'\usepackage{amsmath}'. |
'\usepackage{soul}', |
'\usepackage{soul}'. |
'\usepackage{amssymb}'. |
'\usepackage{amssymb}'. |
'\usepackage{amsfonts}'. |
'\usepackage{amsfonts}'. |
'\usepackage{amsthm}'. |
'\usepackage{amsthm}'. |