--- loncom/interface/lonuserutils.pm 2010/01/20 20:28:40 1.97.2.6
+++ loncom/interface/lonuserutils.pm 2009/10/31 14:27:48 1.102
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.97.2.6 2010/01/20 20:28:40 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.102 2009/10/31 14:27:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,7 +91,7 @@ sub modifyuserrole {
if ($setting eq 'course' || $context eq 'course') {
$scope = '/'.$cid;
$scope =~ s/\_/\//g;
- if (($role ne 'cc') && ($role ne 'co') && ($sec ne '')) {
+ if ($role ne 'cc' && $sec ne '') {
$scope .='/'.$sec;
}
} elsif ($context eq 'domain') {
@@ -295,7 +295,7 @@ sub hidden_input {
}
sub print_upload_manager_header {
- my ($r,$datatoken,$distotal,$krbdefdom,$context,$permission,$crstype)=@_;
+ my ($r,$datatoken,$distotal,$krbdefdom,$context,$permission)=@_;
my $javascript;
#
if (! exists($env{'form.upfile_associate'})) {
@@ -332,7 +332,7 @@ sub print_upload_manager_header {
my $javascript_validations =
&javascript_validations('upload',$krbdefdom,$password_choice,undef,
$env{'request.role.domain'},$context,
- $groupslist,$crstype);
+ $groupslist);
my $checked=(($env{'form.noFirstLine'})?' checked="checked"':'');
$r->print('
'
.&mt('Total number of records found in file: [_1]'
@@ -365,7 +365,7 @@ sub print_upload_manager_header {
###############################################################
sub javascript_validations {
my ($mode,$krbdefdom,$curr_authtype,$curr_authfield,$domain,
- $context,$groupslist,$crstype)=@_;
+ $context,$groupslist)=@_;
my %param = (
kerb_def_dom => $krbdefdom,
curr_authtype => $curr_authtype,
@@ -386,11 +386,10 @@ sub javascript_validations {
if (($context eq 'course') || ($context eq 'domain')) {
if ($context eq 'course') {
if ($env{'request.course.sec'} eq '') {
- $setsection_call = 'setSections(document.'.$param{'formname'}."'$crstype'".');';
-
+ $setsection_call = 'setSections(document.'.$param{'formname'}.');';
$setsections_js =
&setsections_javascript($param{'formname'},$groupslist,
- $mode,'',$crstype);
+ $mode);
} else {
$setsection_call = "'ok'";
}
@@ -831,7 +830,7 @@ sub print_upload_manager_footer {
.' '.&mt('Add a domain role').''
.' '
+ .' '.&mt('Add a course role').''
.'';
} elsif ($context eq 'author') {
$Str .= &Apache::lonhtmlcommon::row_title(
@@ -900,7 +899,7 @@ sub print_upload_manager_footer {
.'
';
if ($context eq 'course') {
$Str .= '
'
- .&mt('Note: This operation may be time consuming when adding several users.')
+ .&mt('Note: For large courses, this operation may be time consuming.')
.'
';
}
$Str .= '
=0) {
@@ -1142,7 +1141,7 @@ sub date_setting_table {
}
sub make_dates_default {
- my ($startdate,$enddate,$context,$crstype = @_;
+ my ($startdate,$enddate,$context,$crstype) = @_;
my $result = '';
if ($context eq 'course') {
my ($cnum,$cdom) = &get_course_identity();
@@ -1203,16 +1202,16 @@ sub default_role_selector {
$options .= ' ';
}
my $courseform = &Apache::loncommon::selectcourse_link
- ('studentform','dccourse','dcdomain','coursedesc',"$env{'request.role.domain'}",undef,'Course/Community');
+ ('studentform','dccourse','dcdomain','coursedesc',"$env{'request.role.domain'}",undef,'Course');
$cb_jscript =
- &Apache::loncommon::coursebrowser_javascript($env{'request.role.domain'},'currsec','studentform','courserole','Course/Community');
+ &Apache::loncommon::coursebrowser_javascript($env{'request.role.domain'},'currsec','studentform');
$coursepick = &Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
'