[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm londropadd.pm lonfeedback.pm lonhtmlcommon.pm lonpopulate.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 08 Aug 2006 19:02:09 -0000
This is a MIME encoded message
--albertel1155063729
Content-Type: text/plain
albertel Tue Aug 8 15:02:09 2006 EDT
Modified files:
/loncom/interface loncoursedata.pm londropadd.pm lonfeedback.pm
lonhtmlcommon.pm lonpopulate.pm
Log:
- BUG#4954 - adding future to the coursedata view of students status
--albertel1155063729
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060808150209.txt"
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.173 loncom/interface/loncoursedata.pm:1.174
--- loncom/interface/loncoursedata.pm:1.173 Tue May 30 08:46:09 2006
+++ loncom/interface/loncoursedata.pm Tue Aug 8 15:02:04 2006
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.173 2006/05/30 12:46:09 www Exp $
+# $Id: loncoursedata.pm,v 1.174 2006/08/08 19:02:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3132,6 +3132,9 @@
if(((!$end) || $now < $end) && ((!$start) || ($now > $start))) {
$status='Active';
}
+ if(($now < $start) && ((!$end) || $now < $end )) {
+ $status='Future';
+ }
$classlist{$student} =
[$sdom,$sname,$end,$start,$id,$section,$fullname,$status,$type,$lockedtype];
}
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.146 loncom/interface/londropadd.pm:1.147
--- loncom/interface/londropadd.pm:1.146 Thu Jul 20 17:55:37 2006
+++ loncom/interface/londropadd.pm Tue Aug 8 15:02:04 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.146 2006/07/20 21:55:37 albertel Exp $
+# $Id: londropadd.pm,v 1.147 2006/08/08 19:02:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1172,7 +1172,7 @@
if (! exists($env{'form.sortby'})) {
$env{'form.sortby'} = 'username';
}
- if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) {
+ if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {
$env{'form.Status'} = 'Active';
}
my $status_select = &Apache::lonhtmlcommon::StatusOptions
@@ -1383,6 +1383,9 @@
if($statusmode eq 'Expired') {
print $CSVfile '"'.&mt('Students with expired roles').'"'."\n";
}
+ if($statusmode eq 'Future') {
+ print $CSVfile '"'.&mt('Students with future roles').'"'."\n";
+ }
if ($statusmode eq 'Any') {
print $CSVfile '"'.join('","',map {
&Apache::loncommon::csv_translate(&mt($_))
@@ -1642,7 +1645,7 @@
my $date_table = &date_setting_table($starttime,$endtime);
#
if (! exists($env{'form.Status'}) ||
- $env{'form.Status'} !~ /^(Any|Expired|Active)$/) {
+ $env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {
$env{'form.Status'} = 'crap';
}
# Make sure student is enrolled in course
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.213 loncom/interface/lonfeedback.pm:1.214
--- loncom/interface/lonfeedback.pm:1.213 Thu Jul 27 11:48:56 2006
+++ loncom/interface/lonfeedback.pm Tue Aug 8 15:02:04 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.213 2006/07/27 15:48:56 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.214 2006/08/08 19:02:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -186,8 +186,8 @@
push @{$roleinfo{$student}}, 'st:'.$section.':'.$status;
}
($classgroups,$studentgroups) =
- &Apache::loncoursedata::get_group_memberships($classlist,$keylist,
- $cdom,$cnum);
+ &Apache::loncoursedata::get_group_memberships($classlist,$keylist,
+ $cdom,$cnum);
}
# Get discussion display default settings for user
@@ -2061,6 +2061,7 @@
<option value="all" selected="selected" />$status_types{'all'}</option>
<option value="Active" />$status_types{'Active'}</option>
<option value="Expired" />$status_types{'Expired'}</option>
+ <option value="Future" />$status_types{'Future'}</option>
</select>
</td>
<td> </td>
@@ -3168,8 +3169,9 @@
);
%{$status_types} = (
all => 'Roles of any status',
- Active => 'Only active roles',
- Expired => 'Only inactive roles'
+ Active => 'Only active roles',
+ Expired => 'Only past roles',
+ Future => 'Only future roles',
);
}
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.150 loncom/interface/lonhtmlcommon.pm:1.151
--- loncom/interface/lonhtmlcommon.pm:1.150 Fri Aug 4 17:33:53 2006
+++ loncom/interface/lonhtmlcommon.pm Tue Aug 8 15:02:04 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.150 2006/08/04 21:33:53 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.151 2006/08/08 19:02:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -689,14 +689,6 @@
$status = $env{'form.Status'} if (exists($env{'form.Status'}));
}
- my $OpSel1 = '';
- my $OpSel2 = '';
- my $OpSel3 = '';
-
- if($status eq 'Any') { $OpSel3 = ' selected'; }
- elsif($status eq 'Expired' ) { $OpSel2 = ' selected'; }
- else { $OpSel1 = ' selected'; }
-
my $Str = '';
$Str .= '<select name="Status"';
if(defined($formName) && $formName ne '' && ! defined($onchange)) {
@@ -707,12 +699,18 @@
}
$Str .= ' size="'.$size.'" ';
$Str .= '>'."\n";
- $Str .= '<option value="Active" '.$OpSel1.'>'.
- &mt('Currently Enrolled').'</option>'."\n";
- $Str .= '<option value="Expired" '.$OpSel2.'>'.
- &mt('Previously Enrolled').'</option>'."\n";
- $Str .= '<option value="Any" '.$OpSel3.'>'.
- &mt('Any Enrollment Status').'</option>'."\n";
+ foreach my $type (['Active', &mt('Currently Enrolled')],
+ ['Future', &mt('Future Enrolled')],
+ ['Expired', &mt('Previously Enrolled')],
+ ['Any', &mt('Any Enrollment Status')]) {
+ my ($name,$label) = @$type;
+ $Str .= '<option value="'.$name.'" ';
+ if ($status eq $name) {
+ $Str .= 'selected="selected" ';
+ }
+ $Str .= '>'.$label.'</option>'."\n";
+ }
+
$Str .= '</select>'."\n";
}
Index: loncom/interface/lonpopulate.pm
diff -u loncom/interface/lonpopulate.pm:1.45 loncom/interface/lonpopulate.pm:1.46
--- loncom/interface/lonpopulate.pm:1.45 Thu Jul 27 21:04:45 2006
+++ loncom/interface/lonpopulate.pm Tue Aug 8 15:02:04 2006
@@ -1,5 +1,5 @@
# automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.45 2006/07/28 01:04:45 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.46 2006/08/08 19:02:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1125,7 +1125,7 @@
if (! exists($env{'form.sortby'})) {
$env{'form.sortby'} = 'username';
}
- if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) {
+ if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {
$env{'form.Status'} = 'Active';
}
my $status_select = &Apache::lonhtmlcommon::StatusOptions($env{'form.Status'});
@@ -1795,7 +1795,7 @@
if ($numcross > 0) {
my @bgcolors=("#eeeeee","#cccccc");
$response .= qq(You indicated that you wish to add an additional $numcross crosslisting(s). For each new crosslisting enter the insititutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section. The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting. The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system.<br/><br/>
- <form name="enter" method="post">);
+ <form name="enter" method="post">); #' stupid emacs
$response .= &Apache::loncommon::start_data_table();
$response .= &Apache::loncommon::start_data_table_row();
$response .= qq(
--albertel1155063729--