@@ -1806,16 +2545,128 @@ END
}
}
+sub view_as_js {
+ my ($url,$symb) = @_;
+ my %lt = &Apache::lonlocal::texthash(
+ ente => 'Enter a username or a student/employee ID',
+ info => 'Information you entered does not match a valid course user',
+ );
+ &js_escape(\%lt);
+ return <<"END";
+
+function toggleViewAsUser(change) {
+ if (document.getElementById('LC_selectuser')) {
+ var seluserid = document.getElementById('LC_selectuser');
+ var currstyle = seluserid.style.display;
+ if (change == 'off') {
+ document.userview.elements['LC_viewas'].value = '';
+ document.userview.elements['vuname'].value = '';
+ document.userview.elements['vid'].value = '';
+ document.userview.submit();
+ return;
+ }
+ if ((document.getElementById('usexpand')) && (document.getElementById('uscollapse'))) {
+ if (currstyle == 'inline') {
+ seluserid.style.display = 'none';
+ document.getElementById('usexpand').innerHTML='► ';
+ document.getElementById('uscollapse').innerHTML='';
+ } else {
+ seluserid.style.display = 'inline';
+ document.getElementById('usexpand').innerHTML='';
+ document.getElementById('uscollapse').innerHTML='◄ ';
+ toggleIdentifier(document.userview);
+ }
+ }
+ }
+ return;
+}
+
+function validCourseUser(form,change) {
+ var possuname = form.elements['vuname'].value;
+ var possuid = form.elements['vid'].value;
+ var domelem = form.elements['vudom'];
+ var possudom = '';
+ if ((domelem.tagName === 'INPUT') && ((domelem.type === 'text') || (domelem.type === 'hidden'))) {
+ possudom = domelem.value;
+ } else if (domelem.tagName === 'SELECT') {
+ possudom = domelem.options[domelem.selectedIndex].value;
+ }
+ if ((possuname == '') && (possuid == '')) {
+ if (change == 'off') {
+ form.elements['LC_viewas'].value = '';
+ form.submit();
+ } else {
+ alert("$lt{'ente'}");
+ }
+ return;
+ }
+ var http = new XMLHttpRequest();
+ var url = "/adm/courseuser";
+ var params = "uname="+possuname+"&uid="+possuid+"&udom="+possudom;
+ http.open("POST", url, true);
+ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ http.onreadystatechange = function() {
+ if (http.readyState == 4 && http.status == 200) {
+ var data = JSON.parse(http.responseText);
+ if (Array.isArray(data.match)) {
+ var len = data.match.length;
+ if (len == 2) {
+ if (data.match[0] != '' && data.match[1] != '') {
+ form.elements['LC_viewas'].value = data.match[0]+':'+data.match[1];
+ form.submit();
+ }
+ } else {
+ alert("$lt{'info'}");
+ }
+ }
+ }
+ return;
+ }
+ http.send(params);
+ return false;
+}
+
+function toggleIdentifier(form) {
+ if ((document.getElementById('LC_vuname')) && (document.getElementById('LC_vid'))) {
+ var radioelem = form.elements['vuidentifier'];
+ if (radioelem.length > 0) {
+ var i;
+ for (i=0; i
"
+ +"action='$annotateurl'>"
+" "
+"<\\/form>"
+'$end_page_annotate');
@@ -1991,6 +2900,23 @@ function open_StoredLinks_Import(rat) {
newWin.focus();
}
+function open_source() {
+ sourcewin=window.open('/adm/source?inhibitmenu=yes&viewonly=1&filename='+currentURL,'LONsource',
+ 'height=500,width=600,resizable=yes,location=no,menubar=no,toolbar=no,scrollbars=yes');
+}
+
+function open_aboutLC() {
+ var isMobile = "$env{'browser.mobile'}";
+ var url = '/adm/about.html';
+ if (isMobile == 1) {
+ openMyModal(url,600,400,'yes');
+ } else {
+ window.open(url,"aboutLONCAPA","height=400,width=600,scrollbars=1,resizable=1,menubar=0,location=1");
+ }
+ return;
+}
+
+
(function (\$) {
\$(document).ready(function () {
\$.single=function(a){return function(b){a[0]=b;return a}}(\$([1]));
@@ -2007,34 +2933,62 @@ function open_StoredLinks_Import(rat) {
$countdown
+$viewuser
+
ENDUTILITY
}
sub serverform {
+ my $target;
+ unless (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
+ $target = ' target="_top"';
+ }
+ if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self')) {
+ $target = ' target="_self"';
+ }
+ my $submit = &mt('Submit');
return(<
+
ENDSERVERFORM
}
sub constspaceform {
+ my ($frameset) = @_;
+ my ($target,$printtarget);
+ if ($frameset) {
+ $target = ' target="_parent"';
+ $printtarget = ' target="_parent"';
+ } else {
+ unless ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) ||
+ (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
+ $target = ' target="_top"';
+ $printtarget = ' target="_top"';
+ }
+ }
return(<
+
-
-
+
ENDCONSTSPACEFORM
}
@@ -2050,25 +3004,25 @@ sub hidden_button_check {
}
sub roles_selector {
- my ($cdom,$cnum,$httphost) = @_;
+ my ($cdom,$cnum,$httphost,$target,$menucoll,$menuref) = @_;
my $crstype = &Apache::loncommon::course_type();
my $now = time;
- my (%courseroles,%seccount,%courseprivs);
+ my (%courseroles,%seccount,%courseprivs,%roledesc);
my $is_cc;
- my ($js,$form,$switcher);
+ my ($js,$form,$switcher,$has_opa_priv);
my $ccrole;
if ($crstype eq 'Community') {
$ccrole = 'co';
} else {
$ccrole = 'cc';
}
- my ($priv,$gotsymb,$destsymb);
+ my ($privref,$gotsymb,$destsymb);
my $destinationurl = $ENV{'REQUEST_URI'};
- if ($destinationurl =~ /\?symb=/) {
+ if ($destinationurl =~ /(\?|\&)symb=/) {
$gotsymb = 1;
} elsif ($destinationurl =~ m{^/enc/}) {
my $plainurl = &Apache::lonenc::unencrypted($destinationurl);
- if ($plainurl =~ /\?symb=/) {
+ if ($plainurl =~ /(\?|\&)symb=/) {
$gotsymb = 1;
}
}
@@ -2083,12 +3037,15 @@ sub roles_selector {
my $destination = $destinationurl;
$destination =~ s/(\?.*)$//;
if (exists($reqprivs->{$destination})) {
- $priv = $reqprivs->{$destination};
+ if ($reqprivs->{$destination} =~ /,/) {
+ @{$privref} = split(/,/,$reqprivs->{$destination});
+ } else {
+ $privref = [$reqprivs->{$destination}];
+ }
}
}
if ($env{'user.role.'.$ccrole.'./'.$cdom.'/'.$cnum}) {
my ($start,$end) = split(/\./,$env{'user.role.'.$ccrole.'./'.$cdom.'/'.$cnum});
-
if ((($start) && ($start<0)) ||
(($end) && ($end<$now)) ||
(($start) && ($now<$start))) {
@@ -2098,7 +3055,9 @@ sub roles_selector {
}
}
if ($is_cc) {
- &get_all_courseroles($cdom,$cnum,\%courseroles,\%seccount,\%courseprivs,$priv);
+ &get_all_courseroles($cdom,$cnum,\%courseroles,\%seccount,\%courseprivs);
+ } elsif ($env{'request.role'} =~ m{^\Qcr/$cdom/$cdom-domainconfig/\E(\w+)\.\Q/$cdom/$cnum\E}) {
+ &get_customadhoc_roles($cdom,$cnum,\%courseroles,\%seccount,\%courseprivs,\%roledesc,$privref);
} else {
my %gotnosection;
foreach my $item (keys(%env)) {
@@ -2114,7 +3073,7 @@ sub roles_selector {
$gotnosection{$role} = 1;
}
}
- if ($priv ne '') {
+ if ((ref($privref) eq 'ARRAY') && (@{$privref} > 0)) {
my $cnumsec = $cnum;
if ($sec ne '') {
$cnumsec .= "/$sec";
@@ -2151,10 +3110,15 @@ sub roles_selector {
}
}
if ((keys(%seccount) > 1) || ($numdiffsec > 1)) {
+ my $targetattr;
+ if ($target ne '') {
+ $targetattr = ' target="'.$target.'"';
+ }
my @submenu;
- $js = &jump_to_role($cdom,$cnum,\%seccount,\%courseroles,\%courseprivs,$priv);
+ $js = &jump_to_role($cdom,$cnum,\%seccount,\%courseroles,\%courseprivs,
+ \%roledesc,$privref,$menucoll,$menuref);
$form =
- ''."\n";
+ $form .= ' '."\n".
+ ''."\n";
foreach my $role (@roles_order) {
my $include;
if (defined($courseroles{$role})) {
if ($env{'request.role'} =~ m{^\Q$role\E}) {
if ($seccount{$role} > 1) {
$include = 1;
+ } else {
+ if ($env{'user.priv.'.$env{'request.role'}."./$cdom/$cnum"} =~/opa\&([^\:]*)/) {
+ $has_opa_priv = 1;
+ }
}
} else {
$include = 1;
}
}
if ($include) {
+ if ($env{"user.priv.$role./$cdom/$cnum./$cdom/$cnum"} =~/opa\&([^\:]*)/) {
+ $has_opa_priv = 1;
+ }
push(@submenu,['javascript:adhocRole('."'$role'".')',
&Apache::lonnet::plaintext($role,$crstype)]);
}
@@ -2192,16 +3164,28 @@ sub roles_selector {
$include = 1;
}
if ($include) {
+ my $rolename;
+ if ($role =~ m{^cr/$cdom/$cdom\-domainconfig/(\w+)(?:/\w+|$)}) {
+ $rolename = $roledesc{$role};
+ if ($rolename eq '') {
+ $rolename = &mt('Helpdesk [_1]',$1);
+ }
+ } else {
+ $rolename = &Apache::lonnet::plaintext($role);
+ }
+ if ($env{"user.priv.$role./$cdom/$cnum./$cdom/$cnum"} =~/opa\&([^\:]*)/) {
+ $has_opa_priv = 1;
+ }
push(@submenu,['javascript:adhocRole('."'$role'".')',
- &Apache::lonnet::plaintext($role)]);
+ $rolename]);
}
}
}
if (@submenu > 0) {
- $switcher = &create_submenu('','',&mt('Switch role'),\@submenu);
+ $switcher = &create_submenu('#',$target,&mt('Switch role'),\@submenu);
}
}
- return ($js,$form,$switcher);
+ return ($js,$form,$switcher,$has_opa_priv);
}
sub get_all_courseroles {
@@ -2274,8 +3258,102 @@ sub get_all_courseroles {
return;
}
+sub get_customadhoc_roles {
+ my ($cdom,$cnum,$courseroles,$seccount,$courseprivs,$roledesc,$privref) = @_;
+ unless ((ref($courseroles) eq 'HASH') && (ref($seccount) eq 'HASH') &&
+ (ref($courseprivs) eq 'HASH') && (ref($roledesc) eq 'HASH')) {
+ return;
+ }
+ my $is_helpdesk = 0;
+ my $now = time;
+ foreach my $role ('dh','da') {
+ if ($env{"user.role.$role./$cdom/"}) {
+ my ($start,$end)=split(/\./,$env{"user.role.$role./$cdom/"});
+ if (!($start && ($now<$start)) && !($end && ($now>$end))) {
+ $is_helpdesk = 1;
+ last;
+ }
+ }
+ }
+ if ($is_helpdesk) {
+ my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($cdom.'_'.$cnum);
+ my %available;
+ if (ref($possroles) eq 'ARRAY') {
+ map { $available{$_} = 1; } @{$possroles};
+ }
+ my %domdefaults = &Apache::lonnet::get_domain_defaults($cdom);
+ if (ref($domdefaults{'adhocroles'}) eq 'HASH') {
+ if (keys(%{$domdefaults{'adhocroles'}})) {
+ my $numsec = 1;
+ my @sections;
+ my ($allseclist,$cached) =
+ &Apache::lonnet::is_cached_new('courseseclist',$cdom.'_'.$cnum);
+ if (defined($cached)) {
+ if ($allseclist ne '') {
+ @sections = split(/,/,$allseclist);
+ $numsec += scalar(@sections);
+ }
+ } else {
+ my %sections_count = &Apache::loncommon::get_sections($cdom,$cnum);
+ @sections = sort(keys(%sections_count));
+ $numsec += scalar(@sections);
+ $allseclist = join(',',@sections);
+ &Apache::lonnet::do_cache_new('courseseclist',$cdom.'_'.$cnum,$allseclist);
+ }
+ my (%adhoc,$gotprivs);
+ my $prefix = "cr/$cdom/$cdom".'-domainconfig';
+ foreach my $role (keys(%{$domdefaults{'adhocroles'}})) {
+ next if (($role eq '') || ($role =~ /\W/));
+ $seccount->{"$prefix/$role"} = $numsec;
+ $roledesc->{"$prefix/$role"} = $description->{$role};
+ if ((ref($privref) eq 'ARRAY') && (@{$privref} > 0)) {
+ if (exists($env{"user.priv.$prefix/$role./$cdom/$cnum./"})) {
+ $courseprivs->{"$prefix/$role./$cdom/$cnum./"} =
+ $env{"user.priv.$prefix/$role./$cdom/$cnum./"};
+ $courseprivs->{"$prefix/$role./$cdom/$cnum./$cdom/"} =
+ $env{"user.priv.$prefix/$role./$cdom/$cnum./$cdom/"};
+ $courseprivs->{"$prefix/$role./$cdom/$cnum./$cdom/$cnum"} =
+ $env{"user.priv.$prefix/$role./$cdom/$cnum./$cdom/$cnum"};
+ } else {
+ unless ($gotprivs) {
+ my ($adhocroles,$privscached) =
+ &Apache::lonnet::is_cached_new('adhocroles',$cdom);
+ if ((defined($privscached)) && (ref($adhocroles) eq 'HASH')) {
+ %adhoc = %{$adhocroles};
+ } else {
+ my $confname = &Apache::lonnet::get_domainconfiguser($cdom);
+ my %roledefs = &Apache::lonnet::dump('roles',$cdom,$confname,'rolesdef_');
+ foreach my $key (keys(%roledefs)) {
+ (undef,my $rolename) = split(/_/,$key);
+ if ($rolename ne '') {
+ my ($systempriv,$domainpriv,$coursepriv) = split(/\_/,$roledefs{$key});
+ $coursepriv = &Apache::lonnet::course_adhocrole_privs($rolename,$cdom,$cnum,$coursepriv);
+ $adhoc{$rolename} = join('_',($systempriv,$domainpriv,$coursepriv));
+ }
+ }
+ &Apache::lonnet::do_cache_new('adhocroles',$cdom,\%adhoc);
+ }
+ $gotprivs = 1;
+ }
+ ($courseprivs->{"$prefix/$role./$cdom/$cnum./"},
+ $courseprivs->{"$prefix/$role./$cdom/$cnum./$cdom/"},
+ $courseprivs->{"$prefix/$role./$cdom/$cnum./$cdom/$cnum"}) =
+ split(/\_/,$adhoc{$role});
+ }
+ }
+ if ($available{$role}) {
+ $courseroles->{"$prefix/$role"} = \@sections;
+ }
+ }
+ }
+ }
+ }
+ return;
+}
+
sub jump_to_role {
- my ($cdom,$cnum,$seccount,$courseroles,$courseprivs,$priv) = @_;
+ my ($cdom,$cnum,$seccount,$courseroles,$courseprivs,$roledesc,$privref,
+ $menucoll,$menuref) = @_;
my %lt = &Apache::lonlocal::texthash(
this => 'This role has section(s) associated with it.',
ente => 'Enter a specific section.',
@@ -2286,6 +3364,7 @@ sub jump_to_role {
role => 'The role you selected is not permitted to view the current page.',
swit => 'Switch role, but display Main Menu page instead?',
);
+ &js_escape(\%lt);
my $js;
if (ref($courseroles) eq 'HASH') {
$js = ' var secpick = new Array("'.$lt{'ente'}.'","'.$lt{'orlb'}.'");'."\n".
@@ -2308,32 +3387,45 @@ sub jump_to_role {
}
}
my $checkroles = 0;
- if ($priv && ref($courseprivs) eq 'HASH') {
- my (%disallowed,%allowed,@disallow);
+ my $fallback = '/adm/menu';
+ my $displaymsg = $lt{'swit'};
+ if ((ref($privref) eq 'ARRAY') && (@{$privref} > 0) && (ref($courseprivs) eq 'HASH')) {
+ my %disallowed;
foreach my $role (sort(keys(%{$courseprivs}))) {
my $trole;
if ($role =~ m{^(.+?)\Q./$cdom/$cnum\E}) {
$trole = $1;
}
if (($trole ne '') && ($trole ne 'cm')) {
- if ($courseprivs->{$role} =~ /\Q:$priv\E($|:|\&\w+)/) {
- $allowed{$trole} = 1;
- } else {
- $disallowed{$trole} = 1;
+ $disallowed{$trole} = 1;
+ foreach my $priv (@{$privref}) {
+ if ($courseprivs->{$role} =~ /\Q:$priv\E($|:|\&\w+)/) {
+ delete($disallowed{$trole});
+ last;
+ }
}
}
}
- foreach my $trole (keys(%disallowed)) {
- unless ($allowed{$trole}) {
- push(@disallow,$trole);
- }
- }
- if (@disallow > 0) {
+ if (keys(%disallowed) > 0) {
$checkroles = 1;
- $js .= " var disallow = new Array('".join("','",@disallow)."');\n".
+ $js .= " var disallow = new Array('".join("','",keys(%disallowed))."');\n".
" var rolecheck = 1;\n";
+ if ($menucoll) {
+ if (ref($menuref) eq 'HASH') {
+ if ($menuref->{'main'} eq 'n') {
+ $fallback = '/adm/navmaps';
+ if (&Apache::loncommon::course_type() eq 'Community') {
+ $displaymsg = &mt('Switch role, but display Community Contents page instead?');
+ } else {
+ $displaymsg = &mt('Switch role, but display Course Contents page instead?');
+ }
+ &js_escape(\$displaymsg);
+ }
+ }
+ }
}
}
+ &js_escape(\$fallback);
if (!$checkroles) {
$js .= " var disallow = new Array();\n".
" rolecheck = 0;\n";
@@ -2356,8 +3448,8 @@ function adhocRole(newrole) {
if (rolecheck > 0) {
for (var i=0; i 'opa',
- '/adm/courseprefs' => 'opa',
+ '/adm/parmset' => 'opa,vpa',
+ '/adm/courseprefs' => 'opa,vpa',
'/adm/whatsnew' => 'whn',
- '/adm/populate' => 'cst',
+ '/adm/populate' => 'cst,vpa,vcl',
'/adm/trackstudent' => 'vsa',
- '/adm/statistics' => 'vgr',
- '/adm/setblock' => 'dcm',
+ '/adm/statistics' => 'mgr,vgr',
+ '/adm/setblock' => 'dcm,vcb',
'/adm/coursedocs' => 'mdc',
};
unless ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet') {
@@ -2446,16 +3538,26 @@ sub required_privs {
sub countdown_timer {
if (($env{'request.course.id'}) && ($env{'request.symb'} ne '') &&
- ($env{'request.filename'}=~/$LONCAPA::assess_re/)) {
+ (($env{'request.filename'}=~/$LONCAPA::assess_re/) ||
+ (($env{'request.symb'} =~ /ext\.tool$/) &&
+ (&Apache::lonnet::EXT('resource.0.gradable',$env{'request.symb'}) =~ /^yes$/i)))) {
my ($type,$hastimeleft,$slothastime);
my $now = time;
if ($env{'request.filename'} =~ /\.task$/) {
$type = 'Task';
+ } elsif ($env{'request.symb'} =~ /ext\.tool$/) {
+ $type = 'tool';
} else {
$type = 'problem';
}
- my ($status,$accessmsg,$slot_name,$slot) =
- &Apache::lonhomework::check_slot_access('0',$type);
+ my ($status,$accessmsg,$slot_name,$slot);
+ if ($type eq 'tool') {
+ ($status,$accessmsg,$slot_name,$slot) =
+ &Apache::lonhomework::check_slot_access('0',$type,$env{'request.symb'},['0']);
+ } else {
+ ($status,$accessmsg,$slot_name,$slot) =
+ &Apache::lonhomework::check_slot_access('0',$type);
+ }
if ($slot_name ne '') {
if (ref($slot) eq 'HASH') {
if (($slot->{'starttime'} < $now) &&
@@ -2469,9 +3571,17 @@ sub countdown_timer {
}
my $duedate = &Apache::lonnet::EXT("resource.0.duedate");
my @interval=&Apache::lonnet::EXT("resource.0.interval");
- my ($timelimit,$usesdone,$proctor,$secret);
+ my ($timelimit,$usesdone,$donebuttontext,$proctor,$secret);
if (@interval > 1) {
- ($timelimit,$usesdone,$proctor,$secret) = split(/_/,$interval[0]);
+ ($timelimit,my $donesuffix) = split(/_/,$interval[0],2);
+ if ($donesuffix =~ /^done\:([^\:]+)\:(.*)$/) {
+ $usesdone = 'done';
+ $donebuttontext = $1;
+ (undef,$proctor,$secret) = split(/_/,$2);
+ } elsif ($donesuffix =~ /^done(|_.+)$/) {
+ $donebuttontext = &mt('Done');
+ ($usesdone,$proctor,$secret) = split(/_/,$donesuffix);
+ }
my $first_access=&Apache::lonnet::get_first_access($interval[1]);
if ($first_access > 0) {
if ($first_access+$timelimit > time) {
@@ -2489,7 +3599,7 @@ sub countdown_timer {
$collapse = '► ';
if ((@interval > 1) && ($hastimeleft)) {
if ($usesdone eq 'done') {
- $donebutton = &done_button_js($interval[1],'','',$proctor);
+ $donebutton = &done_button_js($interval[1],'','',$proctor,$donebuttontext);
}
}
} else {
@@ -2508,7 +3618,7 @@ $donebutton
-
+
@@ -2518,6 +3628,101 @@ END
return;
}
+sub placement_progress {
+ my ($totalpoints,$incomplete) = &Apache::lonplacementtest::check_completion(undef,undef,1);
+ my $complete = 100 - $incomplete;
+ return ''.
+ &mt('Test is [_1]% complete',$complete).' ';
+}
+
+sub linkprot_exit {
+ if (($env{'request.course.id'}) && ($env{'request.deeplink.login'})) {
+ my ($deeplink_symb,$deeplink);
+ my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+ my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ if (($cnum ne '') && ($cdom ne '')) {
+ $deeplink_symb = &Apache::loncommon::deeplink_login_symb($cnum,$cdom);
+ if ($deeplink_symb) {
+ if ($deeplink_symb =~ /\.(page|sequence)$/) {
+ my $mapname = &Apache::lonnet::deversion((&Apache::lonnet::decode_symb($deeplink_symb))[2]);
+ my $navmap = Apache::lonnavmaps::navmap->new();
+ if (ref($navmap)) {
+ $deeplink = $navmap->get_mapparam(undef,$mapname,'0.deeplink');
+ }
+ } else {
+ $deeplink = &Apache::lonnet::EXT('resource.0.deeplink',$deeplink_symb);
+ }
+ if ($deeplink ne '') {
+ my ($state,$others,$listed,$scope,$protect,$display,$target,$exit) = split(/,/,$deeplink);
+ my %lt = &Apache::lonlocal::texthash(
+ title => 'Exit Tool',
+ okdone => 'Click "OK" to exit embedded tool',
+ cancel => 'Click "Cancel" to continue working.',
+ ok => 'OK',
+ exit => 'Cancel',
+ );
+ if ($exit) {
+ my ($show,$text) = split(/:/,$exit);
+ unless ($show eq 'no') {
+ my $height = 250;
+ my $width = 300;
+ my $exitbuttontext;
+ if ($text eq '') {
+ $exitbuttontext = &mt('Exit Tool');
+ } else {
+ $exitbuttontext = $text;
+ }
+ return <
+
+ $exitbuttontext
+
+
+
+
$lt{'okdone'} $lt{'cancel'}
+
+
+
+
+END
+ }
+ }
+ }
+ }
+ }
+ }
+ return;
+}
+
# ================================================================ Main Program
BEGIN {
@@ -2534,14 +3739,17 @@ BEGIN {
$category_positions{$entries[2]}=$entries[1];
$category_names{$entries[2]}=$entries[3];
} elsif ($configline=~/^prim\:/) {
- my @entries = (split(/\:/, $configline))[1..6];
+ my @entries = (split(/\:/, $configline))[1..7];
push(@primary_menu,\@entries);
} elsif ($configline=~/^primsub\:/) {
- my ($parent,@entries) = (split(/\:/, $configline))[1..4];
+ my ($parent,@entries) = (split(/\:/, $configline))[1..5];
push(@{$primary_submenu{$parent}},\@entries);
} elsif ($configline=~/^scnd\:/) {
- my @entries = (split(/\:/, $configline))[1..5];
+ my @entries = (split(/\:/, $configline))[1..6];
push(@secondary_menu,\@entries);
+ } elsif ($configline=~/^scndsub\:/) {
+ my ($parent,@entries) = (split(/\:/, $configline))[1..4];
+ push(@{$secondary_submenu{$parent}},\@entries);
} elsif ($configline) {
push(@desklines,$configline);
}