version 1.484.2.93.2.15, 2023/09/06 13:35:14
|
version 1.484.2.93.2.16, 2023/10/06 14:21:05
|
Line 4681 END
|
Line 4681 END
|
} |
} |
$nomodal = 1; |
$nomodal = 1; |
} |
} |
} elsif (($uploaded) && (!$allowed) && ($url ne '/adm/supplemental?')) { |
} elsif (($uploaded) && ($url ne '/adm/supplemental?') && ($url ne '/adm/coursedocs?')) { |
my $embstyle=&Apache::loncommon::fileembstyle($extension); |
my $embstyle=&Apache::loncommon::fileembstyle($extension); |
unless ($embstyle eq 'ssi') { |
unless ($embstyle eq 'ssi') { |
if (($embstyle eq 'img') |
if (($embstyle eq 'img') |
Line 4787 $form_common."\n".
|
Line 4787 $form_common."\n".
|
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.$disabled.' /> '.&mt('Random Order').' </label></span>'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.$disabled.' /> '.&mt('Random Order').' </label></span>'. |
$form_end; |
$form_end; |
} |
} |
} elsif ($supplementalflag && !$allowed) { |
} elsif ($supplementalflag) { |
my $isexttool; |
my $isexttool; |
if ($url=~m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) { |
if ($url=~m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) { |
$url='/adm/wrapper'.$url; |
$url='/adm/wrapper'.$url; |
Line 4871 $form_end;
|
Line 4871 $form_end;
|
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
} |
} |
} |
} |
if ((!$supplementalflag) && ($nomodal) && ($hostname ne '')) { |
if (($nomodal) && ($hostname ne '')) { |
$link = 'http://'.$hostname.$url; |
$link = 'http://'.$hostname.$url; |
} else { |
} else { |
$link = $url; |
$link = $url; |
} |
} |
$link = &js_escape($link.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'.$anchor); |
my $inhibitmenu; |
|
if ((($supplementalflag) && ($allowed) && ($url =~ m{^/adm/wrapper/})) || |
|
(($allowed) && (($url =~ m{^/adm/(viewclasslist|$match_domain/$match_username/aboutme)(\?|$)}) || |
|
($url =~ m{^/public/$match_domain/$match_courseid/syllabus(\?|$)})))) { |
|
$inhibitmenu = 'only_body=1'; |
|
} else { |
|
$inhibitmenu = 'inhibitmenu=yes'; |
|
} |
|
$link = &js_escape($link.(($url=~/\?/)?'&':'?').$inhibitmenu.$anchor); |
if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage && !$uploaded) { |
if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage && !$uploaded) { |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |
$nolink = 1; |
$nolink = 1; |
Line 5936 sub handler {
|
Line 5944 sub handler {
|
} |
} |
if ($env{'form.forcesupplement'}) { $supplementalflag=1; } |
if ($env{'form.forcesupplement'}) { $supplementalflag=1; } |
if ($env{'form.forcestandard'}) { $supplementalflag=0; } |
if ($env{'form.forcestandard'}) { $supplementalflag=0; } |
unless ($allowed) { $supplementalflag=1; } |
unless (($supplementalflag) || |
unless ($standard) { $supplementalflag=1; } |
($r->uri =~ m{^/adm/coursedocs/showdoc/uploaded/\Q$coursedom\E/\Q$coursenum\E/docs/})) { |
|
unless ($allowed) { $supplementalflag=1; } |
|
unless ($standard) { $supplementalflag=1; } |
|
} |
my $toolsflag=0; |
my $toolsflag=0; |
if ($env{'form.tools'}) { $toolsflag=1; } |
if ($env{'form.tools'}) { $toolsflag=1; } |
|
|
Line 6013 sub handler {
|
Line 6024 sub handler {
|
&Apache::loncommon::validate_folderpath($supplementalflag,$allowed,$coursenum,$coursedom); |
&Apache::loncommon::validate_folderpath($supplementalflag,$allowed,$coursenum,$coursedom); |
} |
} |
} |
} |
|
|
# If we are not allowed to make changes, all we can see are supplemental docs |
# If we are not allowed to make changes and this is supplemental content set folderpath |
if (!$allowed) { |
if ((!$allowed) && ($supplementalflag)) { |
unless ($env{'form.folderpath'} =~ /^supplemental/) { |
unless ($env{'form.folderpath'} =~ /^supplemental/) { |
$env{'form.folderpath'} = &supplemental_base(); |
$env{'form.folderpath'} = &supplemental_base(); |
} |
} |
Line 6245 sub handler {
|
Line 6256 sub handler {
|
if ($supplementalflag) { |
if ($supplementalflag) { |
my $title = &HTML::Entities::encode($env{'form.title'},'\'"<>&'); |
my $title = &HTML::Entities::encode($env{'form.title'},'\'"<>&'); |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
$args = {'bread_crumbs' => $brcrum}; |
$args = {'bread_crumbs' => $brcrum, |
|
'bread_crumbs_nomenu' => 1}; |
} else { |
} else { |
$args = {'force_register' => $showdoc}; |
$args = {'force_register' => $showdoc}; |
} |
} |
Line 6274 sub handler {
|
Line 6286 sub handler {
|
} |
} |
} |
} |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype); |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype); |
|
my $args = {'bread_crumbs' => $brcrum}; |
|
unless (($env{'form.folderpath'} eq '') || |
|
($env{'form.folder'} eq 'supplemental')) { |
|
$args->{'bread_crumbs_nomenu'} = 1; |
|
} |
$r->print(&Apache::loncommon::start_page("Supplemental $crstype Content",undef, |
$r->print(&Apache::loncommon::start_page("Supplemental $crstype Content",undef, |
{'bread_crumbs' => $brcrum,})); |
$args)); |
} else { |
} else { |
my ($breadtext,$breadtitle,$helpitem); |
my ($breadtext,$breadtitle,$helpitem); |
$breadtext = "$crstype Editor"; |
$breadtext = "$crstype Editor"; |