'.&mt('Currently no active roles, courses or communities').'
');
}
&findcourse_advice($r);
- &requestcourse_advice($r);
+ &requestcourse_advice($r);
$r->print('');
if ($countfuture) {
$r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));
@@ -1175,12 +1187,12 @@ sub requestcourse_advice {
&Apache::lonnet::check_can_request($env{'user.domain'},\%can_request,\%request_doms);
if (keys(%request_doms) > 0) {
my ($types,$typename) = &Apache::loncommon::course_types();
- if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) {
+ if ((ref($types) eq 'ARRAY') && (ref($typename) eq 'HASH')) {
$r->print('
'.&mt('Request creation of a course or community').'
'.
'
'.&mt('You have rights to request the creation of courses and/or communities in the following domain(s):').'
');
my (@reqdoms,@reqtypes);
foreach my $type (sort(keys(%request_doms))) {
- push(@reqtypes,$type);
+ push(@reqtypes,$type);
if (ref($request_doms{$type}) eq 'ARRAY') {
my $domstr = join(', ',map { &Apache::lonnet::domain($_) } sort(@{$request_doms{$type}}));
$r->print(
@@ -1213,7 +1225,7 @@ sub requestcourse_advice {
}
if (@reqdoms == 1 || @showtypes > 0) {
$requrl .= '&state=crstype&action=new';
- }
+ }
$r->print('
'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','','').'');
}
}
@@ -1442,11 +1454,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 +1507,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 +1528,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 +1538,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";
@@ -1618,7 +1624,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