--- loncom/interface/londocs.pm 2017/05/10 23:58:24 1.631
+++ loncom/interface/londocs.pm 2017/12/18 22:56:45 1.645
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.631 2017/05/10 23:58:24 raeburn Exp $
+# $Id: londocs.pm,v 1.645 2017/12/18 22:56:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,6 +45,7 @@ use Apache::lontemplate();
use Apache::lonsimplepage();
use Apache::lonhomework();
use Apache::lonpublisher();
+use Apache::lonparmset();
use HTML::Entities;
use HTML::TokeParser;
use GDBM_File;
@@ -52,6 +53,7 @@ use File::MMagic;
use File::Copy;
use Apache::lonlocal;
use Cwd;
+use UUID::Tiny ':std';
use LONCAPA qw(:DEFAULT :match);
my $iconpath;
@@ -659,7 +661,7 @@ sub group_import {
my $marker = $2;
my $info = $3;
my ($toolid,%toolhash,%toolsettings);
- my @extras = ('linktext','explanation','crslabel','crstitle');
+ my @extras = ('linktext','explanation','crslabel','crstitle','crsappend');
my @toolinfo = split(/:/,$info);
if ($residx) {
%toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);
@@ -669,14 +671,17 @@ sub group_import {
}
$toolid =~ s/\D//g;
($toolhash{'target'},$toolhash{'width'},$toolhash{'height'},
- $toolhash{'linktext'},$toolhash{'explanation'},
- $toolhash{'crslabel'},$toolhash{'crstitle'}) = @toolinfo;
+ $toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'},
+ $toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}) = @toolinfo;
foreach my $item (@extras) {
$toolhash{$item} = &unescape($toolhash{$item});
}
+ if ($folder =~ /^supplemental/) {
+ delete($toolhash{'gradable'});
+ }
if (ref($ltitoolsref) eq 'HASH') {
- my @deleted;
if (ref($ltitoolsref->{$toolid}) eq 'HASH') {
+ my @deleted;
$toolhash{'id'} = $toolid;
if (($toolhash{'target'} eq 'iframe') || ($toolhash{'target'} eq 'tab') ||
($toolhash{'target'} eq 'window')) {
@@ -751,11 +756,45 @@ sub group_import {
}
}
}
+ if ($toolhash{'passback'}) {
+ my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4);
+ $toolhash{'gradesecret'} = $gradesecret;
+ $toolhash{'gradesecretdate'} = time;
+ }
+ if ($toolhash{'roster'}) {
+ my $rostersecret = UUID::Tiny::create_uuid_as_string(UUID_V4);
+ $toolhash{'rostersecret'} = $rostersecret;
+ $toolhash{'rostersecretdate'} = time;
+ }
+ my $changegradable;
+ if (($residx) && ($folder =~ /^default/)) {
+ if (exists($toolsettings{'gradable'})) {
+ if (!exists($toolhash{'gradable'})) {
+ push(@deleted,'gradable');
+ $changegradable = 1;
+ }
+ } elsif (exists($toolhash{'gradable'})) {
+ $changegradable = 1;
+ }
+ }
my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum);
if ($putres eq 'ok') {
if (@deleted) {
&Apache::lonnet::del('exttool_'.$marker,\@deleted,$coursedom,$coursenum);
- }
+ }
+ if (($changegradable) && ($folder =~ /^default/)) {
+ my $val;
+ if ($toolhash{'gradable'}) {
+ $val = 'yes';
+ } else {
+ $val = 'no';
+ }
+ &LONCAPA::map::storeparameter($residx,'parameter_0_gradable',$val,
+ 'string_yesno');
+ &remember_parms($residx,'gradable','set',$val);
+ }
+ } else {
+ return (&mt('Failed to save update to external tool.'),1);
}
}
}
@@ -993,6 +1032,7 @@ sub docs_change_log {
'encrypturl' => 'URL hidden',
'randompick' => 'Randomly pick',
'randomorder' => 'Randomly ordered',
+ 'gradable' => 'Grade can be assigned to External Tool',
'set' => 'set to',
'del' => 'deleted');
my $filter = &Apache::loncommon::display_filter('docslog')."\n".
@@ -1100,7 +1140,7 @@ sub docs_change_log {
$r->print('');
if ($docslog{$id}{'logentry'}{'parameter_res'}) {
$r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':
');
- foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder') {
+ foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder','gradable') {
if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) {
# FIXME: internationalization seems wrong here
$r->print('- '.
@@ -1672,8 +1712,8 @@ sub do_paste_from_buffer {
$srcdom{$suffix} = $srcd;
$srcnum{$suffix} = $srcn;
} elsif (($url =~ m{^/res/lib/templates/\w+\.problem$}) ||
- ($url =~ m{^/adm/$match_domain/$match_username/\d+/(bulletinboard|smppg|ext\.tool)$})) {
- my $srctype= $1;
+ ($url =~ m{^/adm/$match_domain/$match_username/\d+/(bulletinboard|smppg)$}) ||
+ ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$})) {
my ($srcd,$srcn) = split(/_/,$cid);
# When paste buffer was populated using an active role in a different course
# check for mdc privilege in the course from which the resource was pasted
@@ -1683,7 +1723,9 @@ sub do_paste_from_buffer {
next;
}
}
- if (($srctype eq 'ext.tool') && ($srcd ne $coursedom)) {
+# When buffer was populated using an active role in a different course
+# disallow pasting of External Tool if course is in a different domain.
+ if (($url =~ m{/ext\.tool$}) && ($srcd ne $coursedom)) {
$notindom{$suffix} = 1;
next;
}
@@ -3016,8 +3058,9 @@ sub update_parameter {
sub handle_edit_cmd {
my ($coursenum,$coursedom) =@_;
+ my $haschanges = 0;
if ($env{'form.cmd'} eq '') {
- return 0;
+ return $haschanges;
}
my ($cmd,$idx)=split('_',$env{'form.cmd'});
@@ -3032,19 +3075,19 @@ sub handle_edit_cmd {
&LONCAPA::map::makezombie($LONCAPA::map::order[$idx]);
}
splice(@LONCAPA::map::order, $idx, 1);
-
+ $haschanges = 1;
} elsif ($cmd eq 'cut') {
&LONCAPA::map::makezombie($LONCAPA::map::order[$idx]);
splice(@LONCAPA::map::order, $idx, 1);
-
+ $haschanges = 1;
} elsif ($cmd eq 'up'
&& ($idx) && (defined($LONCAPA::map::order[$idx-1]))) {
@LONCAPA::map::order[$idx-1,$idx] = @LONCAPA::map::order[$idx,$idx-1];
-
+ $haschanges = 1;
} elsif ($cmd eq 'down'
&& defined($LONCAPA::map::order[$idx+1])) {
@LONCAPA::map::order[$idx+1,$idx] = @LONCAPA::map::order[$idx,$idx+1];
-
+ $haschanges = 1;
} elsif ($cmd eq 'rename') {
my $comment = &LONCAPA::map::qtunescape($env{'form.title'});
if ($comment=~/\S/) {
@@ -3054,11 +3097,26 @@ sub handle_edit_cmd {
# Devalidate title cache
my $renamed_url=&LONCAPA::map::qtescape($url);
&Apache::lonnet::devalidate_title_cache($renamed_url);
-
- } else {
- return 0;
+ $haschanges = 1;
+ } elsif ($cmd eq 'setalias') {
+ my $newvalue = $env{'form.alias'};
+ if ($newvalue ne '') {
+ unless (Apache::lonnet::get_symb_from_alias($newvalue)) {
+ &LONCAPA::map::storeparameter($idx,'parameter_0_mapalias',$newvalue,
+ 'string');
+ &remember_parms($idx,'mapalias','set',$newvalue);
+ $haschanges = 1;
+ }
+ }
+ } elsif ($cmd eq 'delalias') {
+ my $current = (&LONCAPA::map::getparameter($idx,'parameter_0_mapalias'))[0];
+ if ($current ne '') {
+ &LONCAPA::map::delparameter($idx,'parameter_0_mapalias');
+ &remember_parms($idx,'mapalias','del');
+ $haschanges = 1;
+ }
}
- return 1;
+ return $haschanges;
}
sub editor {
@@ -3182,7 +3240,7 @@ sub editor {
# Rename, cut, copy or remove a single resource
if (&handle_edit_cmd($coursenum,$coursedom)) {
my $contentchg;
- if ($env{'form.cmd'} =~ m{^(remove|cut)_}) {
+ if ($env{'form.cmd'} =~ m{^(remove|cut|setalias|delalias)_}) {
$contentchg = 1;
}
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container,$contentchg);
@@ -3422,10 +3480,10 @@ sub editor {
.&Apache::loncommon::start_data_table(undef,'contentlist')
.&Apache::loncommon::start_data_table_header_row()
.'
'.&mt('Move').' | '
- .''.&mt('Actions').' | '
+ .''.&mt('Actions').' | '
.''.&mt('Document').' | ';
if ($folder !~ /^supplemental/) {
- $to_show .= ''.&mt('Settings').' | ';
+ $to_show .= ''.&mt('Settings').' | ';
}
$to_show .= &Apache::loncommon::end_data_table_header_row();
if ($folder !~ /^supplemental/) {
@@ -3453,9 +3511,8 @@ sub editor {
''.
&multiple_check_form('actions',\%lists,$canedit).
' | '.
- ' | '.
- ' | '.
- ''.
+ ' | | '.
+ ''.
&multiple_check_form('settings',\%lists,$canedit).
' | '.
&Apache::loncommon::end_data_table_row();
@@ -3803,7 +3860,7 @@ sub entryline {
my $line=&Apache::loncommon::start_data_table_row();
my ($form_start,$form_end,$form_common,$form_param);
# Edit commands
- my ($esc_path, $path, $symb);
+ my ($esc_path, $path, $symb, $curralias);
if ($env{'form.folderpath'}) {
$esc_path=&escape($env{'form.folderpath'});
$path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
@@ -3872,6 +3929,8 @@ END
'ct' => 'Cut',
'rn' => 'Rename',
'cp' => 'Copy',
+ 'da' => 'Unset alias',
+ 'sa' => 'Set alias',
'ex' => 'External Resource',
'et' => 'External Tool',
'ed' => 'Edit',
@@ -3902,6 +3961,9 @@ END
($url!~/$LONCAPA::assess_page_seq_re/)) {
$confirm_removal = 1;
}
+ if ($url =~ /$LONCAPA::assess_re/) {
+ $curralias = (&LONCAPA::map::getparameter($orderidx,'parameter_0_mapalias'))[0];
+ }
if ($denied{'copy'}) {
$copylink=(<&');
+ $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
}
} elsif (!$env{'request.role.adv'}) {
my $checkencrypt;
@@ -4103,7 +4165,7 @@ END
my $shownsymb = &Apache::lonenc::encrypted($symb);
my $shownurl = &Apache::lonenc::encrypted($url);
if (&Apache::lonnet::symbverify($shownsymb,$shownurl)) {
- $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&');
+ $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
if ($env{'request.enc'} ne '') {
delete($env{'request.enc'});
}
@@ -4289,6 +4351,17 @@ $form_end;
$reinit = &mt('(re-initialize course to access)');
}
$line.=''.$editlink.$renamelink;
+ if ($url =~ /$LONCAPA::assess_re/) {
+ $line.= ' ';
+ if ($curralias ne '') {
+ $line.=''.
+ $lt{'da'}.'';
+ } else {
+ $line.=''.
+ $lt{'sa'}.'';
+ }
+ }
+ $line.=' | ';
my $link;
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) {
$line.='';
@@ -4328,11 +4401,16 @@ $form_end;
$line.=&Apache::loncommon::modal_link($link,$title,600,500);
}
} elsif (($hiddenfolder) || ($hiddenres)) {
- $line.=$title.' '.&mt('(Hidden)').'';
+ $line.=$title.' ('.&mt('Hidden').')';
} else {
$line.=$title.' '.$reinit.'';
}
- $line.="$extresform | ";
+ if (($allowed) && ($curralias ne '')) {
+ $line .= '
('.$curralias.')';
+ } else {
+ $line .= $extresform;
+ }
+ $line .= '';
$rand_pick_text = ' ' if ($rand_pick_text eq '');
$rand_order_text = ' ' if ($rand_order_text eq '');
if (($allowed) && ($folder!~/^supplemental/)) {
@@ -4550,7 +4628,7 @@ sub untiehash {
sub checkonthis {
- my ($r,$url,$level,$title)=@_;
+ my ($r,$url,$level,$title,$checkstale)=@_;
$url=&unescape($url);
$alreadyseen{$url}=1;
$r->rflush();
@@ -4565,10 +4643,22 @@ sub checkonthis {
$r->print(''.
($title?$title:$url).' ');
if ($url=~/^\/res\//) {
+ my $updated;
+ if (($checkstale) && ($url !~ m{^/res/lib/templates/}) &&
+ ($url !~ /\.\d+\.\w+$/)) {
+ $updated = &Apache::lonnet::remove_stale_resfile($url);
+ }
my $result=&Apache::lonnet::repcopy(
&Apache::lonnet::filelocation('',$url));
if ($result eq 'ok') {
$r->print(''.&mt('ok').'');
+ if ($updated) {
+ $r->print('
');
+ for (my $i=0;$i<=$level*5;$i++) {
+ $r->print(' ');
+ }
+ $r->print('- '.&mt('Outdated copy removed'));
+ }
$r->rflush();
&Apache::lonnet::countacc($url);
$url=~/\.(\w+)$/;
@@ -4602,7 +4692,7 @@ sub checkonthis {
&Apache::lonnet::metadata($url,'dependencies');
foreach my $dep (split(/\,/,$dependencies)) {
if (($dep=~/^\/res\//) && (!$alreadyseen{$dep})) {
- &checkonthis($r,$dep,$level+1);
+ &checkonthis($r,$dep,$level+1,'',$checkstale);
}
}
} elsif ($result eq 'unavailable') {
@@ -4616,6 +4706,9 @@ sub checkonthis {
} else {
$r->print(''.&mt('access denied').'');
}
+ if (($updated) && ($result ne 'ok')) {
+ $r->print('
'.&mt('Outdated copy removed'));
+ }
}
}
}
@@ -4668,9 +4761,29 @@ sub list_symbs {
$r->print(&endContentScreen());
}
+sub contentverifyform {
+ my ($r) = @_;
+ my $crstype = &Apache::loncommon::course_type();
+ $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
+ $r->print(&startContentScreen('tools'));
+ $r->print(''.&mt($crstype.' content verification').'
');
+ $r->print('');
+ $r->print(&endContentScreen());
+ return;
+}
sub verifycontent {
- my ($r) = @_;
+ my ($r,$checkstale) = @_;
my $crstype = &Apache::loncommon::course_type();
$r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
@@ -4691,7 +4804,7 @@ sub verifycontent {
}
}
if (($key=~/^src\_(.+)$/) && (!$alreadyseen{&unescape($hash{$key})})) {
- &checkonthis($r,$hash{$key},0,$hash{'title_'.$1});
+ &checkonthis($r,$hash{$key},0,$hash{'title_'.$1},$checkstale);
}
}
&untiehash();
@@ -4699,7 +4812,6 @@ sub verifycontent {
$r->print(&endContentScreen());
}
-
sub devalidateversioncache {
my $src=shift;
&Apache::lonnet::devalidate_cache_new('courseresversion',$env{'request.course.id'}.'_'.
@@ -5162,9 +5274,25 @@ sub handler {
$disabled = ' disabled="disabled"';
}
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);
+ if ($env{'form.inhibitmenu'}) {
+ unless ($env{'form.inhibitmenu'} eq 'yes') {
+ delete($env{'form.inhibitmenu'});
+ }
+ }
+
if ($allowed && $env{'form.verify'}) {
&init_breadcrumbs('verify','Verify Content','Docs_Verify_Content');
- &verifycontent($r);
+ if (!$canedit) {
+ &verifycontent($r);
+ } elsif (($env{'form.checkstale'} ne '') && ($env{'form.checkstale'} =~ /^\d$/)) {
+ &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs?tools=1&verify=1&checkstale=$env{'form.checkstale'}",
+ text=>'Results',
+ faq=>273,
+ bug=>'Instructor Interface'});
+ &verifycontent($r,$env{'form.checkstale'});
+ } else {
+ &contentverifyform($r);
+ }
} elsif ($allowed && $env{'form.listsymbs'}) {
&init_breadcrumbs('listsymbs','List Content IDs');
&list_symbs($r);
@@ -5244,6 +5372,26 @@ sub handler {
'forcesupplement','forcestandard',
'tools','symb','command','supppath']);
+ foreach my $item ('forcesupplement','forcestandard','tools') {
+ next if ($env{'form.'.$item} eq '');
+ unless ($env{'form.'.$item} eq '1') {
+ delete($env{'form.'.$item});
+ }
+ }
+
+ if ($env{'form.command'}) {
+ unless ($env{'form.command'} =~ /^(direct|directnav|editdocs|editsupp|contents|home)$/) {
+ delete($env{'form.command'});
+ }
+ }
+
+ if ($env{'form.symb'}) {
+ my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'});
+ unless (($id =~ /^\d+$/) && (&Apache::lonnet::is_on_map($resurl))) {
+ delete($env{'form.symb'});
+ }
+ }
+
# standard=1: this is a "new-style" course with an uploaded map as top level
# standard=2: this is a "old-style" course, and there is nothing we can do
@@ -5266,6 +5414,38 @@ sub handler {
my $toolsflag=0;
if ($env{'form.tools'}) { $toolsflag=1; }
+ if ($env{'form.folderpath'} ne '') {
+ my @items = split(/\&/,$env{'form.folderpath'});
+ my $badpath;
+ for (my $i=0; $i<@items; $i++) {
+ my $odd = $i%2;
+ if (($odd) && (!$supplementalflag) && ($items[$i] !~ /^[^:]*:(|\d+):(|1):(|1):(|1):(|1)$/)) {
+ $badpath = 1;
+ } elsif ((!$odd) && ($items[$i] !~ /^(default|supplemental)(|_\d+)$/)) {
+ $badpath = 1;
+ }
+ last if ($badpath);
+ }
+ if ($badpath) {
+ delete($env{'form.folderpath'});
+ }
+ }
+
+ if ($env{'form.supppath'} ne '') {
+ my @items = split(/\&/,$env{'form.supppath'});
+ my $badpath;
+ for (my $i=0; $i<@items; $i++) {
+ my $odd = $i%2;
+ if ((!$odd) && ($items[$i] !~ /^supplemental(|_\d+)$/)) {
+ $badpath = 1;
+ }
+ last if ($badpath);
+ }
+ if ($badpath) {
+ delete($env{'form.supppath'});
+ }
+ }
+
my $script='';
my $showdoc=0;
my $addentries = {};
@@ -5450,7 +5630,7 @@ sub handler {
}
}
my $tabidstr = join("','",@tabids);
- %ltitools = &Apache::lonnet::get_domain_ltitools($coursedom);
+ %ltitools = &Apache::lonnet::get_domain_lti($coursedom,'consumer');
my $posslti = keys(%ltitools);
my $hostname = $r->hostname();
$script .= &editing_js($udom,$uname,$supplementalflag,$coursedom,$coursenum,$posslti,
@@ -5538,6 +5718,7 @@ sub handler {
undef($hadchanges);
$uploadphase = &process_file_upload(\$upload_output,$coursenum,$coursedom,
\%allfiles,\%codebase,$context,$crstype);
+ undef($navmap);
if ($hadchanges) {
&mark_hash_old();
}
@@ -5834,6 +6015,11 @@ CRSFORM
$containertag
+
HIDDENFORM
$r->print(&makesimpleeditform($pathitem)."\n".
@@ -6332,8 +6518,10 @@ unless ($container eq 'page') {
$r->print(''.$error.'
');
}
if ($hadchanges) {
- &mark_hash_old();
- }
+ unless (&is_hash_old()) {
+ &mark_hash_old();
+ }
+ }
&changewarning($r,'');
}
@@ -6531,6 +6719,7 @@ my %suporderhash = (
sub embedded_form_elems {
my ($phase,$primaryurl,$newidx) = @_;
my $folderpath = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
+ $newidx =~s /\D+//g;
return <
@@ -6551,7 +6740,11 @@ sub embedded_destination {
} elsif ($folder =~ /^(default|supplemental)_(\d+)$/) {
$destination .= $2.'/';
}
- $destination .= $env{'form.newidx'};
+ my $newidx = $env{'form.newidx'};
+ $newidx =~s /\D+//g;
+ if ($newidx) {
+ $destination .= $newidx;
+ }
my $dir_root = '/userfiles';
return ($destination,$dir_root);
}
@@ -6577,6 +6770,9 @@ sub decompression_info {
}
unshift(@hiddens,$pathitem);
foreach my $item (@hiddens) {
+ if ($item eq 'newidx') {
+ next if ($env{'form.'.$item} =~ /\D/);
+ }
if ($env{'form.'.$item}) {
$hiddenelem .= ''."\n";
@@ -6901,6 +7097,8 @@ sub editing_js {
p_ctr2b => '?',
p_ctr3a => 'Cut those',
p_ctr3b => 'items?',
+ setal => 'Enter a (unique) alias',
+ delal => 'Are you sure you want to eliminate the alias?',
rpck => 'Enter number to pick (e.g., 3)',
imsfile => 'You must choose an IMS package for import',
imscms => 'You must select which Course Management System was the source of the IMS package',
@@ -6945,8 +7143,13 @@ sub editing_js {
} else {
$url = $res;
}
- $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"').'?symb='.
- &HTML::Entities::encode($caller,'<>&"');
+ $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"');
+ if ($backtourl =~ m{^\Q/uploaded/$coursedom/$coursenum/\Edefault_\d+\.sequence$}) {
+ $backtourl .= '?navmap=1';
+ } else {
+ $backtourl .= '?symb='.
+ &HTML::Entities::encode($caller,'<>&"');
+ }
if ($backtourl =~ m{^\Q/public/$coursedom/$coursenum/syllabus\E}) {
if (($ENV{'SERVER_PORT'} == 443) &&
($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) {
@@ -7103,6 +7306,24 @@ function changename(folderpath,index,old
}
}
+function setalias(folderpath,index) {
+ var alias = prompt('$js_lt{"setal"}');
+ if ((alias != null) && (alias != '')) {
+ this.document.forms.aliasform.alias.value=alias;
+ this.document.forms.aliasform.cmd.value='setalias_'+index;
+ this.document.forms.aliasform.folderpath.value=folderpath;
+ this.document.forms.aliasform.submit();
+ }
+}
+
+function delalias(folderpath,index) {
+ if (confirm('$js_lt{"delal"}')) {
+ this.document.forms.aliasform.cmd.value='delalias_'+index;
+ this.document.forms.aliasform.folderpath.value=folderpath;
+ this.document.forms.aliasform.submit();
+ }
+}
+
ENDNEWSCRIPT
} else {
$jsmakefunctions = <