[LON-CAPA-cvs] cvs: loncom /interface loncoursequeueadmin.pm
goltermann
goltermann at source.lon-capa.org
Wed Nov 30 07:31:00 EST 2011
goltermann Wed Nov 30 12:31:00 2011 EDT
Modified files:
/loncom/interface loncoursequeueadmin.pm
Log:
ergonomic improvements for approval of self enrollment and course/community requests:
changed checkboxes to radiobuttons, put them into one line and added the possibility to decide later
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.28 loncom/interface/loncoursequeueadmin.pm:1.29
--- loncom/interface/loncoursequeueadmin.pm:1.28 Fri Aug 26 15:57:56 2011
+++ loncom/interface/loncoursequeueadmin.pm Wed Nov 30 12:31:00 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.28 2011/08/26 15:57:56 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.29 2011/11/30 12:31:00 goltermann Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -424,9 +424,11 @@
}
unless ($context eq 'pending') {
$row = '<td><span class="LC_nobreak"><label>'.
- '<input type="checkbox" value="'.$approve.'" name="approvereq" />'.&mt('Approve').'</label></span><br />'.
+ '<input type="radio" value="'.$approve.'" name="'.$count.'radioreq" />'.&mt('Approve').'</label></span>'.
'<span class="LC_nobreak"><label>'.
- '<input type="checkbox" value="'.$reject.'" name="rejectreq" />'.&mt('Reject').'</label></span><br /></td>';
+ '<input type="radio" value="'.$reject.'" name="'.$count.'radioreq" />'.&mt('Reject').'</label></span>'.
+ '<input type="radio" value="'."later:".$reject.'" name="'.$count.'radioreq" checked />'.&mt('Decide Later').
+ '</label></span><br /></td>';
}
$row .= '<td>'.$namelink.'</td>'."\n";
if ($context eq 'course') {
@@ -461,8 +463,19 @@
@processing_errors, at warn_approves, at warn_rejects, at approvals, at warn_dels,
@rejections, at rejectionerrors, at nopermissions,%courseroles,
%communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype,$queue,$firsturl);
- @approvals = &Apache::loncommon::get_env_multiple('form.approvereq');
- @rejections = &Apache::loncommon::get_env_multiple('form.rejectreq');
+ my $count=0;
+ while (my @course = &Apache::loncommon::get_env_multiple('form.'.$count.'radioreq')) {
+ if (@course[0] =~ /^\d+:.*/) {
+ push(@approvals, at course[0]);
+ } elsif (@course[0] =~ /^later:.*/) {
+ #decide later
+ } else {
+ push(@rejections, at course[0]);
+ }
+ $count+=1;
+ }
+
+
$now = time;
$sender = $env{'user.name'}.':'.$env{'user.domain'};
if ($context eq 'course') {
More information about the LON-CAPA-cvs
mailing list