'.&mt('User [_1] in domain [_2]',
$env{'form.ccuname'}, $env{'form.ccdomain'}).'
');
+ $r->print('
'.&mt('Please be patient').'
');
+
my (%alerts,%rulematch,%inst_results,%curr_rules);
+ my @userinfo = ('firstname','middlename','lastname','generation','permanentemail','id');
my @usertools = ('aboutme','blog','portfolio');
my @requestcourses = ('official','unofficial','community');
my ($othertitle,$usertypes,$types) =
&Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});
+ my %canmodify_status =
+ &Apache::lonuserutils::can_modify_userinfo($context,$env{'form.ccdomain'},
+ ['inststatus']);
if ($env{'form.makeuser'}) {
$r->print('
\n");
+ }
+ }
+ }
+ $r->print(&Apache::loncommon::end_data_table_row());
+ }
+ $r->print(&Apache::loncommon::end_data_table().' ');
+ return;
+}
+
sub tool_changes {
my ($context,$usertools,$oldaccess,$oldaccesstext,$userenv,$changeHash,
$changed,$newaccess,$newaccesstext) = @_;
@@ -3431,7 +3445,7 @@ sub update_roles {
}
} # End of foreach (keys(%env))
# Flush the course logs so reverse user roles immediately updated
- &Apache::lonnet::flushcourselogs();
+ $r->register_cleanup(\&Apache::lonnet::flushcourselogs());
if (@rolechanges == 0) {
$r->print(&mt('No roles to modify'));
}
@@ -4131,7 +4145,7 @@ sub handler {
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Update Users",
'Course_View_Class_List'));
if ($permission->{'cusr'}) {
- &Apache::lonuserutils::update_user_list($r,$context,$setting,$choice);
+ &Apache::lonuserutils::update_user_list($r,$context,$setting,$choice,$crstype);
$r->print(&Apache::loncommon::end_page());
} else {
$r->print(&mt('You are not authorized to make bulk changes to user roles'));
@@ -4318,9 +4332,6 @@ END
# Menu Phase One
sub print_main_menu {
my ($permission,$context,$crstype) = @_;
- if (($context eq 'course') && (&Apache::loncommon::needs_gci_custom())) {
- return &print_gci_main_menu($permission,$context,$crstype)
- }
my $linkcontext = $context;
my $stuterm = lc(&Apache::lonnet::plaintext('st',$crstype));
if (($context eq 'course') && ($crstype eq 'Community')) {
@@ -4385,7 +4396,7 @@ sub print_main_menu {
[
{
linktext => $links{$linkcontext}{'upload'},
- icon => 'sctr.png',
+ icon => 'uplusr.png',
#help => 'Course_Create_Class_List',
url => '/adm/createuser?action=upload',
permission => $permission->{'cusr'},
@@ -4393,7 +4404,7 @@ sub print_main_menu {
},
{
linktext => $links{$linkcontext}{'listusers'},
- icon => 'edit-find.png',
+ icon => 'mngcu.png',
#help => 'Course_View_Class_List',
url => '/adm/createuser?action=listusers',
permission => ($permission->{'view'} || $permission->{'cusr'}),
@@ -4480,7 +4491,7 @@ sub print_main_menu {
},
{
linktext => $linktext{$crstype}{'groups'},
- icon => 'conf.png',
+ icon => 'grps.png',
#help => 'Course_Manage_Group',
url => '/adm/coursegroups?refpage=cusr',
permission => $permission->{'grp_manage'},
@@ -4525,7 +4536,7 @@ sub print_main_menu {
push(@{ $menu[2]->{items} },
{
linktext => 'User Self-Enrollment',
- icon => 'cstr.png',
+ icon => 'self_enroll.png',
#help => 'Course_Self_Enrollment',
url => '/adm/createuser?action=selfenroll',
permission => $permission->{'cusr'},
@@ -4542,82 +4553,6 @@ return Apache::lonhtmlcommon::generate_m
# });
}
-sub print_gci_main_menu {
- my ($permission,$context,$crstype) = @_;
- my $stuterm = lc(&Apache::lonnet::plaintext('st',$crstype));
- my ($cnum,$cdom) = &Apache::lonuserutils::get_course_identity();
- my %links = (
- course => {
- single => 'Add/Modify a Student',
- drop => 'Drop Students',
- upload => 'Upload a File of Course Users',
- singleuser => 'Add/Modify a Course User',
- listusers => 'Manage Course Users',
- },
- );
- my %linktitles = (
- course => {
- singleuser => 'Add a user with a certain role to this course.',
- listusers => 'Show and manage users in this course.',
- single => 'Add a user with the role of student to this course',
- drop => 'Remove a student from this course.',
- upload => 'Upload a CSV or a text file containing users.',
- },
- );
- my @menu = ( {categorytitle => 'Manage Users',
- items =>
- [
- {
- linktext => $links{$context}{'single'},
- #help => 'Course_Add_Student',
- icon => 'list-add.png',
- url => '/adm/createuser?action=singlestudent',
- permission => $permission->{'cusr'},
- linktitle => $linktitles{$context}{'single'},
-
- },
- {
- linktext => $links{$context}{'drop'},
- icon => 'edit-undo.png',
- #help => 'Course_Drop_Student',
- url => '/adm/createuser?action=drop',
- permission => $permission->{'cusr'},
- linktitle => $linktitles{$context}{'drop'},
- },
- {
- linktext => $links{$context}{'upload'},
- icon => 'sctr.png',
- #help => 'Course_Create_Class_List',
- url => '/adm/createuser?action=upload',
- permission => $permission->{'cusr'},
- linktitle => $linktitles{$context}{'upload'},
- },
- {
- linktext => $links{$context}{'listusers'},
- icon => 'edit-find.png',
- #help => 'Course_View_Class_List',
- url => '/adm/createuser?action=listusers',
- permission => ($permission->{'view'} || $permission->{'cusr'}),
- linktitle => $linktitles{$context}{'listusers'},
- },
- ]},
- {categorytitle => 'Administration',
- items => [ ]},
- );
-
- push(@{ $menu[1]->{items} }, #Category: Administration
- {
- linktext => 'Change Log',
- icon => 'document-properties.png',
- #help => 'Course_User_Logs',
- url => '/adm/createuser?action=changelogs',
- permission => $permission->{'cusr'},
- linktitle => 'View change log.',
- },
- );
- return Apache::lonhtmlcommon::generate_menu(@menu);
-}
-
sub restore_prev_selections {
my %saveable_parameters = ('srchby' => 'scalar',
'srchin' => 'scalar',
@@ -5027,7 +4962,7 @@ ENDSCRIPT
''.
&Apache::loncommon::plainname($ccuname,$ccudom).
'';
- $count;
+ $count ++;
}
my $rem = $count%$numcols;
if ($rem) {
@@ -5044,7 +4979,7 @@ ENDSCRIPT
my $cid = $env{'request.course.id'};
my $currlim = $env{'course.'.$cid.'.internal.selfenroll_limit'};
my $currcap = $env{'course.'.$cid.'.internal.selfenroll_cap'};
- my $nolimit = ' checked="checked" ';
+ $nolimit = ' checked="checked" ';
if ($currlim eq 'allstudents') {
$crslimit = ' checked="checked" ';
$selflimit = ' ';
@@ -5100,9 +5035,9 @@ sub visible_in_cat {
dc_chgcat => 'Ask a domain coordinator to change the category assigned to the course, as the one currently assigned is no longer used in the domain',
dc_addcat => 'Ask a domain coordinator to assign a category to the course.',
);
- $visactions{'unhide'} = &mt('Use [_1]Set course environment[_2] to change the "Exclude from course catalog" setting.','"','"');
- $visactions{'chgcat'} = &mt('Use [_1]Set course environment[_2] to change the category assigned to the course, as the one currently assigned is no longer used in the domain.','"','"');
- $visactions{'addcat'} = &mt('Use [_1]Set course environment[_2] to assign a category to the course.','"','"');
+ $visactions{'unhide'} = &mt('Use [_1]Categorize course[_2] to change the "Exclude from course catalog" setting.','','"');
+ $visactions{'chgcat'} = &mt('Use [_1]Categorize course[_2] to change the category assigned to the course, as the one currently assigned is no longer used in the domain.','"','"');
+ $visactions{'addcat'} = &mt('Use [_1]Categorize course[_2] to assign a category to the course.','"','"');
if (ref($domconf{'coursecategories'}) eq 'HASH') {
if ($domconf{'coursecategories'}{'togglecats'} eq 'crs') {
$settable{'togglecats'} = 1;
@@ -5582,7 +5517,16 @@ sub role_display_filter {
# Update Display button
$output .= '
'
.''
- .'
';
+ .'';
+
+ # Server version info
+ $output .= '
'
+ .&mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.'
+ ,'2.6.99.0');
+ if ($version) {
+ $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);
+ }
+ $output .= '
';
return $output;
}
@@ -5931,12 +5875,12 @@ sub build_search_response {
my ($context,$srch,%srch_results) = @_;
my ($currstate,$response,$forcenewuser);
my %names = (
- 'uname' => 'username',
- 'lastname' => 'last name',
+ 'uname' => 'username',
+ 'lastname' => 'last name',
'lastfirst' => 'last name, first name',
- 'crs' => 'this course',
- 'dom' => 'LON-CAPA domain: ',
- 'instd' => 'the institutional directory for domain: ',
+ 'crs' => 'this course',
+ 'dom' => 'LON-CAPA domain',
+ 'instd' => 'the institutional directory for domain',
);
my %single = (
@@ -5956,14 +5900,20 @@ sub build_search_response {
$currstate = 'modify';
$response = &mt("$single{$srch->{'srchtype'}} was found for the $names{$srch->{'srchby'}} ([_1]) in $names{$srch->{'srchin'}}.",$srch->{'srchterm'});
if ($srch->{'srchin'} eq 'dom' || $srch->{'srchin'} eq 'instd') {
- $response .= &display_domain_info($srch->{'srchdomain'});
+ $response .= ': '.&display_domain_info($srch->{'srchdomain'});
}
- } else {
- $response = ''.&mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} ([_1]) in $names{$srch->{'srchin'}}",$srch->{'srchterm'});
+ } else { # Search has nothing found. Prepare message to user.
+ $response = '';
if ($srch->{'srchin'} eq 'dom' || $srch->{'srchin'} eq 'instd') {
- $response .= &display_domain_info($srch->{'srchdomain'});
+ $response .= &mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} [_1] in $names{$srch->{'srchin'}}: [_2]",
+ ''.$srch->{'srchterm'}.'',
+ &display_domain_info($srch->{'srchdomain'}));
+ } else {
+ $response .= &mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} [_1] in $names{$srch->{'srchin'}}.",
+ ''.$srch->{'srchterm'}.'');
}
$response .= '';
+
if ($srch->{'srchin'} ne 'alc') {
$forcenewuser = 1;
my $cansrchinst = 0;
@@ -6335,7 +6285,8 @@ sub update_selfenroll_config {
$newnum ++;
}
}
- for (my $j=0; $j<$env{'form.selfenroll_types_total'}; $j++) { if ((!grep(/^$j$/,@deletedoms)) && (!grep(/^$j$/,@activations))) {
+ for (my $j=0; $j<$env{'form.selfenroll_types_total'}; $j++) {
+ if ((!grep(/^$j$/,@deletedoms)) && (!grep(/^$j$/,@activations))) {
my @types = &Apache::loncommon::get_env_multiple('form.selfenroll_types_'.$j);
if (@types > 0) {
@types = sort(@types);
@@ -6647,7 +6598,7 @@ sub is_courseowner {
}
if ($courseowner ne '') {
if ($courseowner eq $env{'user.name'}.':'.$env{'user.domain'}) {
- return 1;
+ return 1;
}
}
return;