'.&mt('Continue').''.
- &Apache::loncommon::end_page());
+ ' '.&mt('Continue').''
+ );
+ $r->print(&Apache::loncommon::end_page());
}
sub handler {
@@ -243,12 +255,12 @@ sub handler {
# Check if user is a DC trying to enter a course or author space and needs privs to be created
if ($numdc > 0) {
foreach my $envkey (keys %env) {
-# Is this an ad-hoc Coordinator role?
- if (my ($ccrole,$domain,$coursenum) =
- ($envkey =~ m-^form\.(cc|co)\./($match_domain)/($match_courseid)$-)) {
+# Is this an ad-hoc CC-role?
+ if (my ($domain,$coursenum) =
+ ($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) {
if ($dcroles{$domain}) {
&Apache::lonnet::check_adhoc_privs($domain,$coursenum,
- $then,$refresh,$now,$ccrole);
+ $then,$refresh,$now,'cc');
}
last;
}
@@ -479,8 +491,8 @@ ENDENTERKEY
$courseid = substr($courseid, 1);
}
$courseid =~ s/\//_/;
- if ((($role eq 'cc') || ($role eq 'co'))
- && ($env{'course.' . $courseid .'.course.helper.not.run'})) {
+ if ($role eq 'cc' && $env{'course.' . $courseid .
+ '.course.helper.not.run'}) {
$furl = "/adm/helper/course.initialization.helper";
# Send the user to the course they selected
} elsif ($env{'request.course.id'}) {
@@ -659,7 +671,7 @@ ENDHEADER
if ($reinit) {
$r->print(
'
'.
- &mt('As your session file for the course or community has expired, you will need to re-select the course.').'
');
+ &mt('As your session file for the course or community has expired, you will need to re-select it.').'');
} else {
$r->print(
'
'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','','').'');
}
}
@@ -1442,11 +1447,10 @@ sub check_fordc {
sub adhoc_course_role {
my ($refresh,$then) = @_;
- my ($cdom,$cnum,$crstype);
+ my ($cdom,$cnum);
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
- $crstype = &Apache::loncommon::course_type();
- if (&check_forcc($cdom,$cnum,$refresh,$then,$crstype)) {
+ if (&check_forcc($cdom,$cnum,$refresh,$then)) {
my $setprivs;
if (!defined($env{'user.role.'.$env{'form.switchrole'}})) {
$setprivs = 1;
@@ -1496,16 +1500,11 @@ sub adhoc_course_role {
}
sub check_forcc {
- my ($cdom,$cnum,$refresh,$then,$crstype) = @_;
- my ($is_cc,$ccrole);
- if ($crstype eq 'Community') {
- $ccrole = 'co';
- } else {
- $ccrole = 'cc';
- }
+ my ($cdom,$cnum,$refresh,$then) = @_;
+ my $is_cc;
if ($cdom ne '' && $cnum ne '') {
if (&Apache::lonnet::is_course($cdom,$cnum)) {
- my $envkey = 'user.role.'.$ccrole.'./'.$cdom.'/'.$cnum;
+ my $envkey = 'user.role.cc./'.$cdom.'/'.$cnum;
if (defined($env{$envkey})) {
$is_cc = 1;
my ($tstart,$tend)=split(/\./,$env{$envkey});
@@ -1522,7 +1521,7 @@ sub courselink {
my $courseform=&Apache::loncommon::selectcourse_link
('rolechoice','dccourse'.$rowtype.'_'.$dcdom,
'dcdomain'.$rowtype.'_'.$dcdom,'coursedesc'.$rowtype.'_'.
- $dcdom,$dcdom,undef,'Course/Community');
+ $dcdom,$dcdom,undef);
my $hiddenitems = ''.
''.
''.
@@ -1532,7 +1531,7 @@ sub courselink {
sub coursepick_jscript {
my %lt = &Apache::lonlocal::texthash(
- plsu => "Please use the 'Select Course/Community' link to open a separate pick course window where you may select the course or community you wish to enter.",
+ plsu => "Please use the 'Select Course' link to open a separate pick course window where you may select the course or community you wish to enter.",
youc => 'You can only use this screen to select courses and communities in the current domain.',
);
my $verify_script = <<"END";
@@ -1585,10 +1584,9 @@ sub display_cc_role {
my $advanced = $env{'user.adv'};
my $tryagain = $env{'form.tryagain'};
unless ($rolekey =~/^error\:/) {
- if ($rolekey =~ m-^user\.role.(cc|co)\./($match_domain)/($match_courseid)$-) {
- my $ccrole = $1;
- my $tcourseid = $2.'_'.$3;
- my $trolecode = $1.'./'.$2.'/'.$3;
+ if ($rolekey =~ m-^user\.role.cc\./($match_domain)/($match_courseid)$-) {
+ my $tcourseid = $1.'_'.$2;
+ my $trolecode = 'cc./'.$1.'/'.$2;
my $twhere;
my $ttype;
my $tbg='LC_roles_is';
@@ -1603,7 +1601,7 @@ sub display_cc_role {
$twhere=&mt('Currently not available');
$env{'course.'.$tcourseid.'.description'}=$twhere;
}
- my $trole = &Apache::lonnet::plaintext($ccrole,$ttype);
+ my $trole = &Apache::lonnet::plaintext('cc',$ttype);
$twhere.=" ".&mt('Domain').":".$1;
($roletext,$roletext_end) = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,'');
}
@@ -1619,7 +1617,7 @@ sub adhoc_roles_row {
,'','',$dcdom)
.' ';
my $selectcclink = &courselink($dcdom,$rowtype);
- my $ccrole = &Apache::lonnet::plaintext('co',undef,undef,1);
+ my $ccrole = &Apache::lonnet::plaintext('cc');
my $carole = &Apache::lonnet::plaintext('ca');
my $selectcalink = &coauthorlink($dcdom,$rowtype);
$output.=$ccrole.': '.$selectcclink