version 1.257, 2006/11/27 21:20:29
|
version 1.258, 2006/11/28 15:03:19
|
Line 1215 sub editor {
|
Line 1215 sub editor {
|
if ($env{'form.changeparms'}) { |
if ($env{'form.changeparms'}) { |
my $idx=$env{'form.setparms'}; |
my $idx=$env{'form.setparms'}; |
# set parameters |
# set parameters |
if ($env{'form.randpick_'.$idx}) { |
if ($env{'form.changeparms'} eq 'randompick') { |
&LONCAPA::map::storeparameter($idx,'parameter_randompick',$env{'form.randpick_'.$idx},'int_pos'); |
if ($env{'form.randpick_'.$idx}) { |
&remember_parms($idx,'randompick','set',$env{'form.randpick_'.$idx}); |
&LONCAPA::map::storeparameter($idx,'parameter_randompick',$env{'form.randpick_'.$idx},'int_pos'); |
} else { |
&remember_parms($idx,'randompick','set',$env{'form.randpick_'.$idx}); |
&LONCAPA::map::delparameter($idx,'parameter_randompick'); |
} else { |
&remember_parms($idx,'randompick','del'); |
&LONCAPA::map::delparameter($idx,'parameter_randompick'); |
|
&remember_parms($idx,'randompick','del'); |
|
} |
|
} |
|
if ($env{'form.changeparms'} eq 'hiddenresource') { |
|
if ($env{'form.hidprs_'.$idx}) { |
|
&LONCAPA::map::storeparameter($idx,'parameter_hiddenresource','yes','string_yesno'); |
|
&remember_parms($idx,'hiddenresource','set',$env{'form.hidprs_'.$idx}); |
|
} else { |
|
&LONCAPA::map::delparameter($idx,'parameter_hiddenresource'); |
|
&remember_parms($idx,'hiddenresource','del'); |
|
} |
|
} |
|
if ($env{'form.changeparms'} eq 'encrypturl') { |
|
if ($env{'form.encprs_'.$idx}) { |
|
&LONCAPA::map::storeparameter($idx,'parameter_encrypturl','yes','string_yesno'); |
|
&remember_parms($idx,'encrypturl','set',$env{'form.encprs_'.$idx}); |
|
} else { |
|
&LONCAPA::map::delparameter($idx,'parameter_encrypturl'); |
|
&remember_parms($idx,'encrypturl','del'); |
|
} |
} |
} |
if ($env{'form.hidprs_'.$idx}) { |
|
&LONCAPA::map::storeparameter($idx,'parameter_hiddenresource','yes','string_yesno'); |
|
&remember_parms($idx,'hiddenresource','set',$env{'form.hidprs_'.$idx}); |
|
} else { |
|
&LONCAPA::map::delparameter($idx,'parameter_hiddenresource'); |
|
&remember_parms($idx,'hiddenresource','del'); |
|
} |
|
if ($env{'form.encprs_'.$idx}) { |
|
&LONCAPA::map::storeparameter($idx,'parameter_encrypturl','yes','string_yesno'); |
|
&remember_parms($idx,'encrypturl','set',$env{'form.encprs_'.$idx}); |
|
} else { |
|
&LONCAPA::map::delparameter($idx,'parameter_encrypturl'); |
|
&remember_parms($idx,'encrypturl','del'); |
|
} |
|
# store the changed version |
# store the changed version |
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); |
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); |
if ($fatal) { |
if ($fatal) { |
Line 1834 END
|
Line 1840 END
|
'parameter_encrypturl'))[0]=~/^yes$/i); |
'parameter_encrypturl'))[0]=~/^yes$/i); |
$url.='folderpath='.&escape($folderpath).$cpinfo; |
$url.='folderpath='.&escape($folderpath).$cpinfo; |
$parameterset='<label>'.&mt('Randomly Pick: '). |
$parameterset='<label>'.&mt('Randomly Pick: '). |
'<input type="text" size="4" onChange="this.form.changeparms.value=1;this.form.submit()" name="randpick_'.$orderidx.'" value="'. |
'<input type="text" size="4" onChange="this.form.changeparms.value='."'randompick'".';this.form.submit()" name="randpick_'.$orderidx.'" value="'. |
(&LONCAPA::map::getparameter($orderidx, |
(&LONCAPA::map::getparameter($orderidx, |
'parameter_randompick'))[0]. |
'parameter_randompick'))[0]. |
'" />'. |
'" />'. |
Line 1873 END
|
Line 1879 END
|
((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); |
((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); |
$line.=(<<ENDPARMS); |
$line.=(<<ENDPARMS); |
<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<nobr><label><input type="checkbox" name="hidprs_$orderidx" onClick="this.form.changeparms.value=1;this.form.submit()" $hidtext /> $lt{'hd'}</label></nobr></td> |
<nobr><label><input type="checkbox" name="hidprs_$orderidx" onClick="this.form.changeparms.value='hiddenresource';this.form.submit()" $hidtext /> $lt{'hd'}</label></nobr></td> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<nobr><label><input type="checkbox" name="encprs_$orderidx" onClick="this.form.changeparms.value=1;this.form.submit()" $enctext /> $lt{'ec'}</label></nobr></td> |
<nobr><label><input type="checkbox" name="encprs_$orderidx" onClick="this.form.changeparms.value='encrypturl';this.form.submit()" $enctext /> $lt{'ec'}</label></nobr></td> |
<td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td> |
<td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td> |
ENDPARMS |
ENDPARMS |
} |
} |