version 1.410, 2013/03/19 23:28:57
|
version 1.411, 2013/04/24 02:43:59
|
Line 847 sub prepare_functions {
|
Line 847 sub prepare_functions {
|
# This applies in course context |
# This applies in course context |
# |
# |
if (($resurl eq "/public/$cdom/$cnum/syllabus") && ($perms{'mdc'})) { |
if (($resurl eq "/public/$cdom/$cnum/syllabus") && ($perms{'mdc'})) { |
if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ /\w/) { |
$cfile = $resurl; |
&switch('','',6,1,'pcstr.png','Edit', |
$home = &Apache::lonnet::homeserver($cnum,$cdom); |
'resource[_2]', |
if ($env{'form.forceedit'}) { |
"go('/adm/courseprefs?phase=display&actions=courseinfo')", |
$forceview = 1; |
'Edit this resource'); |
|
$editbutton = 1; |
|
} else { |
} else { |
$cfile = $resurl; |
$forceedit = 1; |
$home = &Apache::lonnet::homeserver($cnum,$cdom); |
|
if ($env{'form.forceedit'}) { |
|
$forceview = 1; |
|
} else { |
|
$forceedit = 1; |
|
} |
|
$editbutton = &get_editbutton($cfile,$home,$switchserver, |
|
$forceedit,$forceview,$forcereg); |
|
} |
} |
|
$editbutton = &get_editbutton($cfile,$home,$switchserver, |
|
$forceedit,$forceview,$forcereg); |
} elsif (($resurl eq '/adm/extresedit') && |
} elsif (($resurl eq '/adm/extresedit') && |
(($env{'form.symb'}) || ($env{'form.folderpath'}))) { |
(($env{'form.symb'}) || ($env{'form.folderpath'}))) { |
($cfile,$home,$switchserver,$forceedit,$forceview) = |
($cfile,$home,$switchserver,$forceedit,$forceview) = |