$form_start
+ $form_common
$form_end
$form_start
+ $form_common
$form_end
- $form_start $parameterset $form_end
- $form_start $rand_order_text $form_end |
+ $rand_pick_text
+ $rand_order_text |
ENDPARMS
}
$line.=&Apache::loncommon::end_data_table_row();
@@ -3162,7 +3180,8 @@ sub editing_js {
p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!',
p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.',
p_ctr2a => 'Cut[_98]',
- p_ctr2b => '?[_98]'
+ p_ctr2b => '?[_98]',
+ rpck => 'Enter number to pick (e.g., 3)',
);
my $crstype = &Apache::loncommon::course_type();
@@ -3356,6 +3375,37 @@ this.document.forms.renameform.pagesymb.
this.document.forms.renameform.submit();
}
+function updatePick(targetform,index,caller) {
+ var pickitem = document.getElementById('rpick_'+index);
+ var picknumitem = document.getElementById('rpicknum_'+index);
+ if (pickitem.checked) {
+ var picknum=prompt('$lt{"rpck"}',picknumitem.value);
+ if (picknum == '' || picknum == null) {
+ if (caller == 'check') {
+ pickitem.checked=false;
+ return;
+ }
+ } else {
+ picknum.toString();
+ var regexdigit=/^\\d+\$/;
+ if (regexdigit.test(picknum)) {
+ picknumitem.value = picknum;
+ targetform.changeparms.value='randompick';
+ targetform.submit();
+ } else {
+ if (caller == 'check') {
+ pickitem.checked=false;
+ }
+ return;
+ }
+ }
+ } else {
+ picknumitem.value = 0;
+ targetform.changeparms.value='randompick';
+ targetform.submit();
+ }
+}
+
function unselectInactive(nav) {
currentNav = document.getElementById(nav);
currentLis = currentNav.getElementsByTagName('LI');