--- loncom/interface/loncommon.pm 2005/10/04 18:29:54 1.277
+++ loncom/interface/loncommon.pm 2005/11/01 20:47:15 1.281
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.277 2005/10/04 18:29:54 albertel Exp $
+# $Id: loncommon.pm,v 1.281 2005/11/01 20:47:15 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1565,10 +1565,11 @@ sub authform_nochange{
kerb_def_dom => 'MSU.EDU',
@_,
);
- my $result = &mt('[_1] Do not change login data',
+ my $result = '';
return $result;
}
@@ -1600,14 +1601,15 @@ sub authform_kerberos{
my $jscall = "javascript:changed_radio('krb',$in{'formname'});";
my $result .= &mt
('[_1] Kerberos authenticated with domain [_2] '.
- '[_3] Version 4 [_4] Version 5',
- '',
- '',
- '',
- '');
+ '');
return $result;
}
@@ -1632,9 +1634,9 @@ sub authform_internal{
my $jscall = "javascript:changed_radio('int',$args{'formname'});";
my $result.=&mt
('[_1] Internally authenticated (with initial password [_2])',
- '',
- '');
return $result;
}
@@ -1659,9 +1661,9 @@ sub authform_local{
my $jscall = "javascript:changed_radio('loc',$in{'formname'});";
my $result.=&mt('[_1] Local Authentication with argument [_2]',
- '',
- '');
return $result;
}
@@ -1675,9 +1677,9 @@ sub authform_filesystem{
my $jscall = "javascript:changed_radio('fsys',$in{'formname'});";
my $result.= &mt
('[_1] Filesystem Authenticated (with initial password [_2])',
- '',
- '');
return $result;
}
@@ -3082,6 +3084,7 @@ sub get_course_users {
my $startidx = &Apache::loncoursedata::CL_START();
my $endidx = &Apache::loncoursedata::CL_END();
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum);
+ my $now = time;
foreach my $student (keys(%{$classlist})) {
if (defined($$types{'active'})) {
if ($$classlist{$student}[$statusidx] eq 'Active') {
@@ -3089,12 +3092,12 @@ sub get_course_users {
}
}
if (defined($$types{'previous'})) {
- if ($$classlist{$student}[$endidx] <= time) {
+ if ($$classlist{$student}[$endidx] <= $now) {
push(@{$$users{st}{$student}},'previous');
}
}
if (defined($$types{'future'})) {
- if (($$classlist{$student}[$startidx] > 0) && ($$classlist{$student}[$endidx] > time) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) {
+ if (($$classlist{$student}[$startidx] > $now) && ($$classlist{$student}[$endidx] > $now) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) {
push(@{$$users{st}{$student}},'future');
}
}
@@ -3117,6 +3120,15 @@ sub get_course_users {
}
}
}
+ if (grep/^ow$/,@{$roles}) {
+ if ((defined($cdom)) && (defined($cnum))) {
+ my %csettings = &Apache::lonnet::get('environment',['internal.courseowner'],$cdom,$cnum);
+ if ( defined($csettings{'internal.courseowner'}) ) {
+ my $owner = $csettings{'internal.courseowner'};
+ $$users{'ow'}{$owner.':'.$cdom} = 'any';
+ }
+ }
+ }
}
return;
}
@@ -3706,7 +3718,7 @@ the routine &Apache::lonnet::transfer_pr
my $uniq=0;
sub get_cgi_id {
$uniq=($uniq+1)%100000;
- return (time.'_'.$uniq);
+ return (time.'_'.$$.'_'.$uniq);
}
############################################################