');
+ .'');
}
$r->print(&Apache::loncommon::end_page());
return OK;
}
-sub is_active_author {
- if ($env{'user.role.au./'.$env{'user.domain'}.'/'} =~ /^(\d*)\.(\d*)$/) {
- if ((!$1 || $1 < time) &&
- (!$2 || $2 > time)) {
- return 1;
- }
- }
- return;
-}
-
-sub reqauthor_check {
- my $queued = $env{'environment.requestauthorqueued'};
- my %reqauthor = &Apache::lonnet::get('requestauthor',['author_status','author'],
- $env{'user.domain'},$env{'user.name'});
- my $reqstatus = $reqauthor{'author_status'};
- if (($reqstatus eq '' && $queued ne '') ||
- ($env{'environment.requestauthorqueued'} !~ /^\Q$reqstatus\E/)) {
- if (ref($reqauthor{'author'}) eq 'HASH') {
- $queued = $reqstatus.':'.$reqauthor{'author'}{'timestamp'};
- } else {
- undef($queued);
+sub roles_from_env {
+ my ($roleshash,$update) = @_;
+ my $count = 0;
+ if (ref($roleshash) eq 'HASH') {
+ foreach my $envkey (keys(%env)) {
+ if ($envkey =~ m{^user\.role\.(\w+)[./]}) {
+ next if ($1 eq 'gr');
+ $roleshash->{$envkey} = $env{$envkey};
+ my ($start,$end) = split(/\./,$env{$envkey});
+ unless ($end && $end<$update) {
+ $count ++;
+ }
+ }
}
- &Apache::lonnet::appenv({'environment.requestauthorqueued' => $queued});
}
- return $queued;
+ return $count;
}
sub gather_roles {
- my ($update,$refresh,$now,$reinit,$nochoose,$roletext,$sortrole,$roleclass,$futureroles,$timezones,$loncaparev) = @_;
+ my ($update,$refresh,$now,$reinit,$nochoose,$roles_in_env,$roletext,$sortrole,$roleclass,$futureroles,
+ $timezones,$loncaparev) = @_;
my ($countactive,$countfuture,$inrole,$possiblerole) = (0,0,0,'');
my $advanced = $env{'user.adv'};
my $tryagain = $env{'form.tryagain'};
my @ids = &Apache::lonnet::current_machine_ids();
- foreach my $envkey (sort(keys(%env))) {
- my $button = 1;
- my $switchserver='';
- my $switchwarning;
- my ($role_text,$role_text_end,$sortkey);
- if ($envkey=~/^user\.role\./) {
- my ($role,$where,$trolecode,$tstart,$tend,$tremark,$tstatus,$tpstart,$tpend);
+ if (ref($roles_in_env) eq 'HASH') {
+ my %adhocdesc;
+ foreach my $envkey (sort(keys(%{$roles_in_env}))) {
+ my $button = 1;
+ my $switchserver='';
+ my $switchwarning;
+ my ($role_text,$role_text_end,$sortkey,$role,$where,$trolecode,$tstart,
+ $tend,$tremark,$tstatus,$tpstart,$tpend);
&Apache::lonnet::role_status($envkey,$update,$refresh,$now,\$role,\$where,
\$trolecode,\$tstatus,\$tstart,\$tend);
next if (!defined($role) || $role eq '' || $role =~ /^gr/);
@@ -1102,7 +1243,7 @@ sub gather_roles {
if (($tstatus eq 'is')
|| ($tstatus eq 'selected')
|| ($tstatus eq 'future')
- || ($env{'form.showall'})) {
+ || ($env{'form.display'} eq 'showall')) {
my $timezone = &role_timezone($where,$timezones);
if ($tstart) {
$tpstart=&Apache::lonlocal::locallocaltime($tstart,$timezone);
@@ -1134,12 +1275,15 @@ sub gather_roles {
my $trole;
if ($role =~ /^cr\//) {
my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);
- if ($tremark) { $tremark.=' '; }
- $tremark.=&mt('Customrole defined by [_1].',$rauthor.':'.$rdomain);
+ unless ($rauthor eq $rdomain.'-domainconfig') {
+ if ($tremark) { $tremark.=' '; }
+ $tremark.=&mt('Custom role defined by [_1].',$rauthor.':'.$rdomain);
+ }
}
$trole=Apache::lonnet::plaintext($role);
my $ttype;
my $twhere;
+ my $skipcal;
my ($tdom,$trest,$tsection)=
split(/\//,Apache::lonnet::declutter($where));
# First, Co-Authorship roles
@@ -1153,7 +1297,7 @@ sub gather_roles {
}
#next if ($home eq 'no_host');
$home = &Apache::lonnet::hostname($home);
- $ttype='Construction Space';
+ $ttype='Authoring Space';
$twhere=&mt('User').': '.$trest.' '.&mt('Domain').
': '.$tdom.' '.
' '.&mt('Server').': '.$home;
@@ -1172,7 +1316,7 @@ sub gather_roles {
}
#next if ($home eq 'no_host');
$home = &Apache::lonnet::hostname($home);
- $ttype='Construction Space';
+ $ttype='Authoring Space';
$twhere=&mt('Domain').': '.$tdom.' '.&mt('Server').
': '.$home;
$env{'course.'.$tdom.'_'.$trest.'.description'}='ca';
@@ -1181,7 +1325,32 @@ sub gather_roles {
} elsif ($trest) {
my $tcourseid=$tdom.'_'.$trest;
$ttype = &Apache::loncommon::course_type($tcourseid);
- $trole = &Apache::lonnet::plaintext($role,$ttype,$tcourseid);
+ if ($role !~ /^cr/) {
+ $trole = &Apache::lonnet::plaintext($role,$ttype,$tcourseid);
+ } elsif ($role =~ m{^\Qcr/$tdom/$tdom\E\-domainconfig/(\w+)$}) {
+ my $rolename = $1;
+ my $desc;
+ if (ref($adhocdesc{$tdom}) eq 'HASH') {
+ $desc = $adhocdesc{$tdom}{$rolename};
+ } else {
+ my %domdef = &Apache::lonnet::get_domain_defaults($tdom);
+ if (ref($domdef{'adhocroles'}) eq 'HASH') {
+ foreach my $rolename (sort(keys(%{$domdef{'adhocroles'}}))) {
+ if (ref($domdef{'adhocroles'}{$rolename}) eq 'HASH') {
+ $adhocdesc{$tdom}{$rolename} = $domdef{'adhocroles'}{$rolename}{'desc'};
+ $desc = $adhocdesc{$tdom}{$rolename};
+ }
+ }
+ }
+ }
+ if ($desc ne '') {
+ $trole = $desc;
+ } else {
+ $trole = &mt('Helpdesk[_1]',' '.$rolename);
+ }
+ } else {
+ $trole = (split(/\//,$role,4))[-1];
+ }
if ($env{'course.'.$tcourseid.'.description'}) {
my $home=$env{'course.'.$tcourseid.'.home'};
$twhere=$env{'course.'.$tcourseid.'.description'};
@@ -1195,7 +1364,7 @@ sub gather_roles {
my $required = $env{'course.'.$tcourseid.'.internal.releaserequired'};
if ($required ne '') {
($switchserver,$switchwarning) =
- &check_release_required($loncaparev,$tcourseid,$trolecode,$required);
+ &Apache::loncommon::check_release_required($loncaparev,$tcourseid,$trolecode,$required);
if ($switchserver || $switchwarning) {
$button = 0;
}
@@ -1218,7 +1387,7 @@ sub gather_roles {
my $required = $newhash{'internal.releaserequired'};
if ($required ne '') {
($switchserver,$switchwarning) =
- &check_release_required($loncaparev,$tcourseid,$trolecode,$required);
+ &Apache::loncommon::check_release_required($loncaparev,$tcourseid,$trolecode,$required);
if ($switchserver || $switchwarning) {
$button = 0;
}
@@ -1229,8 +1398,12 @@ sub gather_roles {
$env{'course.'.$tcourseid.'.description'}=$twhere;
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey;
$ttype = 'Unavailable';
+ $skipcal = 1;
}
}
+ if ($ttype eq 'Placement') {
+ $ttype = 'Placement Test';
+ }
if ($tsection) {
$twhere.=' '.&mt('Section').': '.$tsection;
}
@@ -1247,7 +1420,8 @@ sub gather_roles {
($role_text,$role_text_end) =
&build_roletext($trolecode,$tdom,$trest,$tstatus,$tryagain,
$advanced,$tremark,$tbg,$trole,$twhere,$tpstart,
- $tpend,$nochoose,$button,$switchserver,$reinit,$switchwarning);
+ $tpend,$nochoose,$button,$switchserver,$reinit,
+ $switchwarning,$skipcal);
$roletext->{$envkey}=[$role_text,$role_text_end];
if (!$sortkey) {$sortkey=$twhere."\0".$envkey;}
$sortrole->{$sortkey}=$envkey;
@@ -1319,7 +1493,7 @@ sub roletable_headers {
my $doheaders;
if ((ref($sortrole) eq 'HASH') && (ref($roleclass) eq 'HASH')) {
$r->print(' '
- .&Apache::loncommon::start_data_table()
+ .&Apache::loncommon::start_data_table('LC_textsize_mobile')
.&Apache::loncommon::start_data_table_header_row()
);
if (!$nochoose) { $r->print('
'); }
@@ -1345,12 +1519,12 @@ sub roletable_headers {
}
sub roletypes {
- my @types = ('Domain','Construction Space','Course','Community','Unavailable','System');
+ my @types = ('Domain','Authoring Space','Course','Placement Test','Community','Unavailable','System');
return @types;
}
sub print_rolerows {
- my ($r,$doheaders,$roleclass,$sortrole,$dcroles,$roletext) = @_;
+ my ($r,$doheaders,$roleclass,$sortrole,$dcroles,$roletext,$update,$then) = @_;
if ((ref($roleclass) eq 'HASH') && (ref($sortrole) eq 'HASH')) {
my @types = &roletypes();
foreach my $type (@types) {
@@ -1368,12 +1542,14 @@ sub print_rolerows {
&Apache::loncommon::end_data_table_row();
}
}
- if ($sortrole->{$which} =~ m-dc\./($match_domain)/-) {
+ if ($sortrole->{$which} =~ m{^user\.role\.dc\./($match_domain)/}) {
if (ref($dcroles) eq 'HASH') {
if ($dcroles->{$1}) {
$output .= &adhoc_roles_row($1,'');
}
}
+ } elsif ($sortrole->{$which} =~ m{^user\.role\.(dh)\./($match_domain)/}) {
+ $output .= &adhoc_customroles_row($1,$2,'',$update,$then);
}
}
}
@@ -1394,7 +1570,7 @@ sub print_rolerows {
}
sub findcourse_advice {
- my ($r) = @_;
+ my ($r,$cattype) = @_;
my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
if (&Apache::lonnet::auto_run(undef,$env{'user.domain'})) {
@@ -1409,37 +1585,36 @@ sub findcourse_advice {
} else {
$r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').' ');
}
- $r->print('
'.&mt('Self-Enrollment').'
'.
- '
'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).' ');
- $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'
'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).' ');
+ $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'
'.
+ &Apache::loncoursequeueadmin::queued_selfenrollment());
+ }
return;
}
sub requestcourse_advice {
- my ($r) = @_;
+ my ($r,$cattype,$inrole) = @_;
my $domdesc = &Apache::lonnet::domain($env{'user.domain'},'description');
my $esc_dom = &HTML::Entities::encode($env{'user.domain'},'"<>&');
- my (%can_request,%request_doms);
+ my (%can_request,%request_doms,$output);
&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')) {
- $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);
if (ref($request_doms{$type}) eq 'ARRAY') {
my $domstr = join(', ',map { &Apache::lonnet::domain($_) } sort(@{$request_doms{$type}}));
- $r->print(
+ $output .=
'
'
.&mt('[_1]'.$typename->{$type}.'[_2] in domain: [_3]',
'',
'',
''.$domstr.'')
- .'
'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','','').'');
+ }
+ if ($output) {
+ $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):').
+ '
'.
+ $output.
+ '
'.
+ &mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.',
+ '','').
+ '');
+ }
}
+ } elsif (!$env{'user.adv'}) {
+ if ($inrole) {
+ $r->print('
'.&mt('Currently no additional roles, courses or communities').'
');
+ } else {
+ $r->print('
'.&mt('Currently no active roles, courses or communities').'
');
+ }
+ &findcourse_advice($r,$cattype);
}
return;
}
@@ -1484,7 +1676,7 @@ sub privileges_info {
my (undef,$tdom,$trest,$tsec)=split(m{/},$where);
if ($trest) {
if ($env{'course.'.$tdom.'_'.$trest.'.description'} eq 'ca') {
- $ttype='Construction Space';
+ $ttype='Authoring Space';
$twhere='User: '.$trest.', Domain: '.$tdom;
} else {
$ttype= &Apache::loncommon::course_type($tdom.'_'.$trest);
@@ -1525,7 +1717,8 @@ sub privileges_info {
}
sub build_roletext {
- my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$trole,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver,$reinit,$switchwarning) = @_;
+ my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$trole,$twhere,
+ $tpstart,$tpend,$nochoose,$button,$switchserver,$reinit,$switchwarning,$skipcal) = @_;
my ($roletext,$roletext_end);
my $is_dc=($trolecode =~ m/^dc\./);
my $rowspan=($is_dc) ? ''
@@ -1581,7 +1774,7 @@ sub build_roletext {
$trolecode."','".$buttonname.'\');" />';
}
}
- if ($trolecode !~ m/^(dc|ca|au|aa)\./) {
+ if (($trolecode !~ m/^(dc|ca|au|aa)\./) && (!$skipcal)) {
$tremark.=&Apache::lonannounce::showday(time,1,
&Apache::lonannounce::readcalendar($tdom.'_'.$trest));
}
@@ -1597,24 +1790,6 @@ sub build_roletext {
return ($roletext,$roletext_end);
}
-sub check_needs_switchserver {
- my ($possiblerole) = @_;
- my $needs_switchserver;
- my ($role,$where) = split(/\./,$possiblerole,2);
- my (undef,$tdom,$twho) = split(/\//,$where);
- my ($server_status,$home);
- if (($role eq 'ca') || ($role eq 'aa')) {
- ($server_status,$home) = &check_author_homeserver($twho,$tdom);
- } else {
- ($server_status,$home) = &check_author_homeserver($env{'user.name'},
- $env{'user.domain'});
- }
- if ($server_status eq 'switchserver') {
- $needs_switchserver = 1;
- }
- return $needs_switchserver;
-}
-
sub check_author_homeserver {
my ($uname,$udom)=@_;
if (($uname eq '') || ($udom eq '')) {
@@ -1632,29 +1807,45 @@ sub check_author_homeserver {
}
}
-sub check_fordc {
- my ($dcroles,$update,$then) = @_;
+sub check_for_adhoc {
+ my ($dcroles,$dhroles,$update,$then) = @_;
my $numdc = 0;
+ my $numdh = 0;
+ my $numadhoc = 0;
+ my $num_custom_adhoc = 0;
if ($env{'user.adv'}) {
- foreach my $envkey (sort keys %env) {
- if ($envkey=~/^user\.role\.dc\.\/($match_domain)\/$/) {
- my $dcdom = $1;
- my $livedc = 1;
+ foreach my $envkey (sort(keys(%env))) {
+ if ($envkey=~/^user\.role\.(dc|dh)\.\/($match_domain)\/$/) {
+ my $role = $1;
+ my $roledom = $2;
+ my $liverole = 1;
my ($tstart,$tend)=split(/\./,$env{$envkey});
my $limit = $update;
- if ($env{'request.role'} eq 'dc./'.$dcdom.'/') {
+ if ((($role eq 'dc') && ($env{'request.role'} eq 'dc./'.$roledom.'/')) ||
+ (($role eq 'dh') && ($env{'request.role'} eq 'dh./'.$roledom.'/'))) {
$limit = $then;
}
- if ($tstart && $tstart>$limit) { $livedc = 0; }
- if ($tend && $tend <$limit) { $livedc = 0; }
- if ($livedc) {
- $$dcroles{$dcdom} = $envkey;
- $numdc++;
+ if ($tstart && $tstart>$limit) { $liverole = 0; }
+ if ($tend && $tend <$limit) { $liverole = 0; }
+ if ($liverole) {
+ if ($role eq 'dc') {
+ $dcroles->{$roledom} = $envkey;
+ $numdc++;
+ } else {
+ $dhroles->{$roledom} = $envkey;
+ my %domdefaults = &Apache::lonnet::get_domain_defaults($roledom);
+ if (ref($domdefaults{'adhocroles'}) eq 'HASH') {
+ if (keys(%{$domdefaults{'adhocroles'}})) {
+ $numadhoc ++;
+ }
+ }
+ $numdh++;
+ }
}
}
}
}
- return $numdc;
+ return ($numdc,$numdh,$numadhoc);
}
sub adhoc_course_role {
@@ -1674,8 +1865,13 @@ sub adhoc_course_role {
$setprivs = 1;
}
}
+ unless ($setprivs) {
+ if (!exists($env{'user.priv.'.$env{'form.switchrole'}.'./'})) {
+ $setprivs = 1;
+ }
+ }
if ($setprivs) {
- if ($env{'form.switchrole'} =~ m-^(in|ta|ep|ad|st|cr)([\w/]*)\./\Q$cdom\E/\Q$cnum\E/?(\w*)$-) {
+ if ($env{'form.switchrole'} =~ m-^(in|ta|ep|ad|st|cr)(.*?)\./\Q$cdom\E/\Q$cnum\E/?(\w*)$-) {
my $role = $1;
my $custom_role = $2;
my $usec = $3;
@@ -1690,9 +1886,15 @@ sub adhoc_course_role {
my %cgroups =
&Apache::lonnet::get_active_groups($env{'user.domain'},
$env{'user.name'},$cdom,$cnum);
+ my $ccrole;
+ if ($crstype eq 'Community') {
+ $ccrole = 'co';
+ } else {
+ $ccrole = 'cc';
+ }
foreach my $group (keys(%cgroups)) {
$group_privs{$group} =
- $env{'user.priv.cc./'.$cdom.'/'.$cnum.'./'.$cdom.'/'.$cnum.'/'.$group};
+ $env{'user.priv.'.$ccrole.'./'.$cdom.'/'.$cnum.'./'.$cdom.'/'.$cnum.'/'.$group};
}
$newgroups{'/'.$cdom.'/'.$cnum} = \%group_privs;
my $area = '/'.$cdom.'/'.$cnum;
@@ -1701,7 +1903,11 @@ sub adhoc_course_role {
$spec .= '/'.$usec;
$area .= '/'.$usec;
}
- &Apache::lonnet::standard_roleprivs(\%newrole,$role,$cdom,$spec,$cnum,$area);
+ if ($role =~ /^cr/) {
+ &Apache::lonnet::custom_roleprivs(\%newrole,$role,$cdom,$cnum,$spec,$area);
+ } else {
+ &Apache::lonnet::standard_roleprivs(\%newrole,$role,$cdom,$spec,$cnum,$area);
+ }
&Apache::lonnet::set_userprivs(\%userroles,\%newrole,\%newgroups);
my $adhocstart = $refresh-1;
$userroles{'user.role.'.$spec} = $adhocstart.'.';
@@ -1736,76 +1942,26 @@ sub check_forcc {
return $is_cc;
}
-sub check_release_required {
- my ($loncaparev,$tcourseid,$trolecode,$required) = @_;
- my ($switchserver,$warning);
- if ($required ne '') {
- my ($reqdmajor,$reqdminor) = ($required =~ /^(\d+)\.(\d+)$/);
- my ($major,$minor) = ($loncaparev =~ /^\'?(\d+)\.(\d+)\.[\w.\-]+\'?$/);
- if ($reqdmajor ne '' && $reqdminor ne '') {
- my $otherserver;
- if (($major eq '' && $minor eq '') ||
- (($reqdmajor > $major) || (($reqdmajor == $major) && ($reqdminor > $minor)))) {
- my ($userdomserver) = &Apache::lonnet::choose_server($env{'user.domain'});
- my $switchlcrev =
- &Apache::lonnet::get_server_loncaparev($env{'user.domain'},
- $userdomserver);
- my ($swmajor,$swminor) = ($switchlcrev =~ /^\'?(\d+)\.(\d+)\.[\w.\-]+\'?$/);
- if (($swmajor eq '' && $swminor eq '') || ($reqdmajor > $swmajor) ||
- (($reqdmajor == $swmajor) && ($reqdminor > $swminor))) {
- my $cdom = $env{'course.'.$tcourseid.'.domain'};
- if ($cdom ne $env{'user.domain'}) {
- my ($coursedomserver,$coursehostname) = &Apache::lonnet::choose_server($cdom);
- my $serverhomeID = &Apache::lonnet::get_server_homeID($coursehostname);
- my $serverhomedom = &Apache::lonnet::host_domain($serverhomeID);
- my %defdomdefaults = &Apache::lonnet::get_domain_defaults($serverhomedom);
- my %udomdefaults = &Apache::lonnet::get_domain_defaults($env{'user.domain'});
- my $remoterev = &Apache::lonnet::get_server_loncaparev($serverhomedom,$coursedomserver);
- my $canhost =
- &Apache::lonnet::can_host_session($env{'user.domain'},
- $coursedomserver,
- $remoterev,
- $udomdefaults{'remotesessions'},
- $defdomdefaults{'hostedsessions'});
-
- if ($canhost) {
- $otherserver = $coursedomserver;
- } else {
- $warning = &mt('Requires LON-CAPA version [_1].',$env{'course.'.$tcourseid.'.internal.releaserequired'}).' '. &mt("No suitable server could be found amongst servers in either your own domain or in the course's domain.");
- }
- } else {
- $warning = &mt('Requires LON-CAPA version [_1].',$env{'course.'.$tcourseid.'.internal.releaserequired'}).' '.&mt("No suitable server could be found amongst servers in your own domain (which is also the course's domain).");
- }
- } else {
- $otherserver = $userdomserver;
- }
- }
- if ($otherserver ne '') {
- $switchserver = 'otherserver='.$otherserver.'&role='.$trolecode;
- }
- }
- }
- return ($switchserver,$warning);
-}
-
sub courselink {
- my ($dcdom,$rowtype) = @_;
+ my ($roledom,$rowtype,$role) = @_;
my $courseform=&Apache::loncommon::selectcourse_link
- ('rolechoice','dccourse'.$rowtype.'_'.$dcdom,
- 'dcdomain'.$rowtype.'_'.$dcdom,'coursedesc'.$rowtype.'_'.
- $dcdom,$dcdom,undef,'Course/Community');
- my $hiddenitems = ''.
- ''.
- ''.
- '';
+ ('rolechoice','course'.$rowtype.'_'.$roledom.'_'.$role,
+ 'domain'.$rowtype.'_'.$roledom.'_'.$role,
+ 'coursedesc'.$rowtype.'_'.$roledom.'_'.$role,
+ $roledom.':'.$role,undef,'Course/Community');
+ my $hiddenitems = ''.
+ ''.
+ ''.
+ '';
return $courseform.$hiddenitems;
}
sub coursepick_jscript {
- my %lt = &Apache::lonlocal::texthash(
+ my %js_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.",
youc => 'You can only use this screen to select courses and communities in the current domain.',
);
+ &js_escape(\%js_lt);
my $verify_script = <<"END";