';
my @linkdests = ('aboutme');
if ($permission->{'cusr'}) {
@@ -2386,6 +2382,7 @@ END
$env{'request.course.sec'})) {
push(@linkdests,'track');
}
+
$output .= '';
my $usernamelink = $env{'form.usernamelink'};
if ($usernamelink eq '') {
@@ -2655,7 +2652,7 @@ END
if ($clickers!~/\w/) { $clickers='-'; }
$in{'clicker'} = $clickers;
my $role = $in{'role'};
- $in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype);
+ $in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype);
if (! defined($in{'start'}) || $in{'start'} == 0) {
$in{'start'} = &mt('none');
} else {
@@ -2942,7 +2939,7 @@ sub print_username_link {
$output = $in->{'username'};
} else {
$output = '{'username'}','$in->{'domain'}'".')">'.
+ "'$in->{'username'}','$in->{'domain'}'".')" />'.
$in->{'username'}.'';
}
return $output;
@@ -2954,7 +2951,6 @@ sub role_type_names {
'author' => 'Co-Author Roles',
'course' => 'Course Roles',
'community' => 'Community Roles',
-
);
return %lt;
}
@@ -3409,7 +3405,6 @@ sub results_header_row {
}
} elsif (($env{'form.roletype'} eq 'course') ||
($env{'form.roletype'} eq 'community')) {
-
my $coursefilter = $env{'form.coursepick'};
if ($env{'form.roletype'} eq 'course') {
if ($coursefilter eq 'category') {
@@ -3662,8 +3657,7 @@ sub print_first_users_upload_form {
$str .= '';
$str .= '';
-
- $str .= ''.&mt('Upload a file containing information about users').''."\n";
+ $str .= ''.&mt('Upload a file containing information about users').''."\n";
# Excel and CSV Help
$str .= ''
@@ -3809,7 +3803,7 @@ sub upfile_drop_add {
} elsif ($setting eq 'course') {
$defaultrole = $env{'form.courserole'};
$defaultsec = $env{'form.sections'};
- }
+ }
} elsif ($context eq 'author') {
$defaultrole = $env{'form.defaultrole'};
} elsif ($context eq 'course') {
@@ -4161,7 +4155,7 @@ sub upfile_drop_add {
$role = 'cr_'.$env{'user.domain'}.'_'.
$env{'user.name'}.'_'.$role;
}
- if (($role ne 'cc') && ($role ne 'co')) {
+ if (($role ne 'cc') && ($role ne 'co')) {
if (@secs > 1) {
$multiple = 1;
foreach my $sec (@secs) {
@@ -4820,7 +4814,7 @@ sub setsections_javascript {
accr => 'A course coordinator role will be added with access to all sections.',
acor => 'A coordinator role will be added with access to all sections',
inea => 'In each course, each user may only have one student role at a time.',
- inec => 'In each community, each user may only have one member role at a time.',
+ inec => 'In each community, each user may only have on member role at a time.',
youh => 'You had selected ',
secs => 'sections.',
plmo => 'Please modify your selections so they include no more than one section.',
@@ -4828,13 +4822,11 @@ sub setsections_javascript {
plch => 'Please choose a different section name.',
mnot => 'may not be used as a section name, as it is the name of a course group.',
secn => 'Section names and group names must be distinct. Please choose a different section name.',
- nonw => 'Section names may only contain letters or numbers.',
);
$setsection_js .= <<"ENDSECCODE";
function setSections(formname,crstype) {
var re1 = /^currsec_/;
- var re2 =/\\W/;
var groups = new Array($groupslist);
for (var i=0;i 0) {
- alert("$alerts{'nonw'}\\n$alerts{'plch'}");
- return;
- }
- numsec = numsec + validsecs.length;
}
if ((role == 'st') && (numsec > 1)) {
@@ -5047,14 +5025,22 @@ sub roles_by_context {
if ($env{'request.role'} =~ m{^dc\./}) {
push(@allroles,'ad');
}
- push(@allroles,('ta','ep','in'));
- if ($crstype eq 'Community') {
- push(@allroles,'co');
+ if (&Apache::loncommon::needs_gci_custom()) {
+ if ($crstype eq 'Community') {
+ push(@allroles,'co');
+ } else {
+ push(@allroles,'cc');
+ }
} else {
- push(@allroles,'cc');
- }
- if ($custom) {
- push(@allroles,'cr');
+ push(@allroles,('ta','ep','in'));
+ if ($crstype eq 'Community') {
+ push(@allroles,'co');
+ } else {
+ push(@allroles,'cc');
+ }
+ if ($custom) {
+ push(@allroles,'cr');
+ }
}
} elsif ($context eq 'author') {
@allroles = ('ca','aa');
@@ -5378,7 +5364,7 @@ sub sectioncheck_alerts {
my %alerts = &Apache::lonlocal::texthash(
curd => 'You must select a course or community in the current domain',
inea => 'In each course, each user may only have one student role at a time',
- inco => 'In each community, each user may only have one member role at a time',
+ inco => 'In each community, each user may only have one member role at a time',
youh => 'You had selected',
sect => 'sections',
plsm => 'Please modify your selections so they include no more than one section',
|