-
-ENDPROGBAR
- }
- &r_print($r,$content.&LCprogressbar_script($LCcurrentid,$number_to_do));
+ &r_print($r,$content.&LCprogressbar_script($LCcurrentid));
}
sub LCprogressbarUpdate {
- my ($r,$val,$text,$number_to_do)=@_;
- if ($number_to_do) {
- unless ($val) {
- if ($LClastpercent) {
- $val=$LClastpercent;
- } else {
- $val=0;
- }
- }
- if ($val<0) { $val=0; }
- if ($val>100) { $val=0; }
- $LClastpercent=$val;
- unless ($text) { $text=$val.'%'; }
- } else {
- $val = 'false';
+ my ($r,$val,$text)=@_;
+ unless ($val) {
+ if ($LClastpercent) {
+ $val=$LClastpercent;
+ } else {
+ $val=0;
+ }
}
+ if ($val<0) { $val=0; }
+ if ($val>100) { $val=0; }
+ $LClastpercent=$val;
+ unless ($text) { $text=$val.'%'; }
$text=&js_ready($text);
&r_print($r,<
//
ENDUPDATE
@@ -10162,21 +8089,14 @@ function expand_div(caller) {
sub simple_error_page {
my ($r,$title,$msg,$args) = @_;
- my %displayargs;
if (ref($args) eq 'HASH') {
if (!$args->{'no_auto_mt_msg'}) { $msg = &mt($msg); }
- if ($args->{'only_body'}) {
- $displayargs{'only_body'} = 1;
- }
- if ($args->{'no_nav_bar'}) {
- $displayargs{'no_nav_bar'} = 1;
- }
} else {
$msg = &mt($msg);
}
my $page =
- &Apache::loncommon::start_page($title,'',\%displayargs).
+ &Apache::loncommon::start_page($title).
'
'.$msg.'
'.
&Apache::loncommon::end_page();
if (ref($r)) {
@@ -10393,7 +8313,7 @@ role status: active, previous or future.
sub check_user_status {
my ($udom,$uname,$cdom,$crs,$role,$sec) = @_;
my %userinfo = &Apache::lonnet::dump('roles',$udom,$uname);
- my @uroles = keys(%userinfo);
+ my @uroles = keys %userinfo;
my $srchstr;
my $active_chk = 'none';
my $now = time;
@@ -10482,7 +8402,7 @@ sub get_sections {
}
}
- if ($check_students) {
+ if ($check_students) {
my ($classlist) = &Apache::loncoursedata::get_classlist($cdom,$cnum);
my $sec_index = &Apache::loncoursedata::CL_SECTION();
my $status_index = &Apache::loncoursedata::CL_STATUS();
@@ -10878,8 +8798,8 @@ sub get_user_quota {
if ($quota eq '' || wantarray) {
if ($quotaname eq 'course') {
my %domdefs = &Apache::lonnet::get_domain_defaults($udom);
- if (($crstype eq 'official') || ($crstype eq 'unofficial') ||
- ($crstype eq 'community') || ($crstype eq 'textbook')) {
+ if (($crstype eq 'official') || ($crstype eq 'unofficial') ||
+ ($crstype eq 'community') || ($crstype eq 'textbook')) {
$defquota = $domdefs{$crstype.'quota'};
}
if ($defquota eq '') {
@@ -11063,6 +8983,8 @@ sub excess_filesize_warning {
###############################################
+
+
sub get_secgrprole_info {
my ($cdom,$cnum,$needroles,$type) = @_;
my %sections_count = &get_sections($cdom,$cnum);
@@ -11101,24 +9023,8 @@ sub get_secgrprole_info {
}
sub user_picker {
- my ($dom,$srch,$forcenewuser,$caller,$cancreate,$usertype,$context,$fixeddom,$noinstd) = @_;
+ my ($dom,$srch,$forcenewuser,$caller,$cancreate,$usertype,$context) = @_;
my $currdom = $dom;
- my @alldoms = &Apache::lonnet::all_domains();
- if (@alldoms == 1) {
- my %domsrch = &Apache::lonnet::get_dom('configuration',
- ['directorysrch'],$alldoms[0]);
- my $domdesc = &Apache::lonnet::domain($alldoms[0],'description');
- my $showdom = $domdesc;
- if ($showdom eq '') {
- $showdom = $dom;
- }
- if (ref($domsrch{'directorysrch'}) eq 'HASH') {
- if ((!$domsrch{'directorysrch'}{'available'}) &&
- ($domsrch{'directorysrch'}{'lcavailable'} eq '0')) {
- return (&mt('LON-CAPA directory search is not available in domain: [_1]',$showdom),0);
- }
- }
- }
my %curr_selected = (
srchin => 'dom',
srchby => 'lastname',
@@ -11139,7 +9045,7 @@ sub user_picker {
}
$srchterm = $srch->{'srchterm'};
}
- my %html_lt=&Apache::lonlocal::texthash(
+ my %lt=&Apache::lonlocal::texthash(
'usr' => 'Search criteria',
'doma' => 'Domain/institution to search',
'uname' => 'username',
@@ -11152,8 +9058,6 @@ sub user_picker {
'exact' => 'is',
'contains' => 'contains',
'begins' => 'begins with',
- );
- my %js_lt=&Apache::lonlocal::texthash(
'youm' => "You must include some text to search for.",
'thte' => "The text you are searching for must contain at least two characters when using a 'begins' type search.",
'thet' => "The text you are searching for must contain at least three characters when using a 'contains' type search.",
@@ -11163,16 +9067,7 @@ sub user_picker {
'whse' => "When searching by last,first you must include at least one character in the first name.",
'thfo' => "The following need to be corrected before the search can be run:",
);
- &html_escape(\%html_lt);
- &js_escape(\%js_lt);
- my $domform;
- my $allow_blank = 1;
- if ($fixeddom) {
- $allow_blank = 0;
- $domform = &select_dom_form($currdom,'srchdomain',$allow_blank,1,undef,[$currdom]);
- } else {
- $domform = &select_dom_form($currdom,'srchdomain',$allow_blank,1);
- }
+ my $domform = &select_dom_form($currdom,'srchdomain',1,1);
my $srchinsel = ' \n";
@@ -11199,10 +9093,10 @@ sub user_picker {
foreach my $option ('lastname','lastfirst','uname') {
if ($curr_selected{'srchby'} eq $option) {
$srchbysel .= '
- ';
+ ';
} else {
$srchbysel .= '
- ';
+ ';
}
}
$srchbysel .= "\n \n";
@@ -11211,10 +9105,10 @@ sub user_picker {
foreach my $option ('begins','contains','exact') {
if ($curr_selected{'srchtype'} eq $option) {
$srchtypesel .= '
- ';
+ ';
} else {
$srchtypesel .= '
- ';
+ ';
}
}
$srchtypesel .= "\n \n";
@@ -11299,46 +9193,46 @@ function validateEntry(callingForm) {
if (srchterm == "") {
checkok = 0;
- msg += "$js_lt{'youm'}\\n";
+ msg += "$lt{'youm'}\\n";
}
if (srchtype== 'begins') {
if (srchterm.length < 2) {
checkok = 0;
- msg += "$js_lt{'thte'}\\n";
+ msg += "$lt{'thte'}\\n";
}
}
if (srchtype== 'contains') {
if (srchterm.length < 3) {
checkok = 0;
- msg += "$js_lt{'thet'}\\n";
+ msg += "$lt{'thet'}\\n";
}
}
if (srchin == 'instd') {
if (srchdomain == '') {
checkok = 0;
- msg += "$js_lt{'yomc'}\\n";
+ msg += "$lt{'yomc'}\\n";
}
}
if (srchin == 'dom') {
if (srchdomain == '') {
checkok = 0;
- msg += "$js_lt{'ymcd'}\\n";
+ msg += "$lt{'ymcd'}\\n";
}
}
if (srchby == 'lastfirst') {
if (srchterm.indexOf(",") == -1) {
checkok = 0;
- msg += "$js_lt{'whus'}\\n";
+ msg += "$lt{'whus'}\\n";
}
if (srchterm.indexOf(",") == srchterm.length -1) {
checkok = 0;
- msg += "$js_lt{'whse'}\\n";
+ msg += "$lt{'whse'}\\n";
}
}
if (checkok == 0) {
- alert("$js_lt{'thfo'}\\n"+msg);
+ alert("$lt{'thfo'}\\n"+msg);
return;
}
if (checkok == 1) {
@@ -11356,10 +9250,10 @@ $new_user_create
END_BLOCK
$output .= &Apache::lonhtmlcommon::start_pick_box().
- &Apache::lonhtmlcommon::row_title($html_lt{'doma'}).
+ &Apache::lonhtmlcommon::row_title($lt{'doma'}).
$domform.
&Apache::lonhtmlcommon::row_closure().
- &Apache::lonhtmlcommon::row_title($html_lt{'usr'}).
+ &Apache::lonhtmlcommon::row_title($lt{'usr'}).
$srchbysel.
$srchtypesel.
''.
@@ -11367,165 +9261,61 @@ END_BLOCK
&Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::end_pick_box().
' ';
- return ($output,1);
+ return $output;
}
sub user_rule_check {
my ($usershash,$checks,$alerts,$rulematch,$inst_results,$curr_rules,$got_rules) = @_;
- my ($response,%inst_response);
+ my $response;
if (ref($usershash) eq 'HASH') {
- if (keys(%{$usershash}) > 1) {
- my (%by_username,%by_id,%userdoms);
- my $checkid;
- if (ref($checks) eq 'HASH') {
- if ((!defined($checks->{'username'})) && (defined($checks->{'id'}))) {
- $checkid = 1;
- }
- }
- foreach my $user (keys(%{$usershash})) {
- my ($uname,$udom) = split(/:/,$user);
- if ($checkid) {
- if (ref($usershash->{$user}) eq 'HASH') {
- if ($usershash->{$user}->{'id'} ne '') {
- $by_id{$udom}{$usershash->{$user}->{'id'}} = $uname;
- $userdoms{$udom} = 1;
- if (ref($inst_results) eq 'HASH') {
- $inst_results->{$uname.':'.$udom} = {};
- }
- }
- }
- } else {
- $by_username{$udom}{$uname} = 1;
- $userdoms{$udom} = 1;
- if (ref($inst_results) eq 'HASH') {
- $inst_results->{$uname.':'.$udom} = {};
- }
- }
- }
- foreach my $udom (keys(%userdoms)) {
- if (!$got_rules->{$udom}) {
- my %domconfig = &Apache::lonnet::get_dom('configuration',
- ['usercreation'],$udom);
- if (ref($domconfig{'usercreation'}) eq 'HASH') {
- foreach my $item ('username','id') {
- if (ref($domconfig{'usercreation'}{$item.'_rule'}) eq 'ARRAY') {
- $$curr_rules{$udom}{$item} =
- $domconfig{'usercreation'}{$item.'_rule'};
- }
- }
- }
- $got_rules->{$udom} = 1;
- }
+ foreach my $user (keys(%{$usershash})) {
+ my ($uname,$udom) = split(/:/,$user);
+ next if ($udom eq '' || $uname eq '');
+ my ($id,$newuser);
+ if (ref($usershash->{$user}) eq 'HASH') {
+ $newuser = $usershash->{$user}->{'newuser'};
+ $id = $usershash->{$user}->{'id'};
}
- if ($checkid) {
- foreach my $udom (keys(%by_id)) {
- my ($outcome,$results) = &Apache::lonnet::get_multiple_instusers($udom,$by_id{$udom},'id');
- if ($outcome eq 'ok') {
- foreach my $id (keys(%{$by_id{$udom}})) {
- my $uname = $by_id{$udom}{$id};
- $inst_response{$uname.':'.$udom} = $outcome;
- }
- if (ref($results) eq 'HASH') {
- foreach my $uname (keys(%{$results})) {
- if (exists($inst_response{$uname.':'.$udom})) {
- $inst_response{$uname.':'.$udom} = $outcome;
- $inst_results->{$uname.':'.$udom} = $results->{$uname};
- }
- }
- }
- }
+ my $inst_response;
+ if (ref($checks) eq 'HASH') {
+ if (defined($checks->{'username'})) {
+ ($inst_response,%{$inst_results->{$user}}) =
+ &Apache::lonnet::get_instuser($udom,$uname);
+ } elsif (defined($checks->{'id'})) {
+ ($inst_response,%{$inst_results->{$user}}) =
+ &Apache::lonnet::get_instuser($udom,undef,$id);
}
} else {
- foreach my $udom (keys(%by_username)) {
- my ($outcome,$results) = &Apache::lonnet::get_multiple_instusers($udom,$by_username{$udom});
- if ($outcome eq 'ok') {
- foreach my $uname (keys(%{$by_username{$udom}})) {
- $inst_response{$uname.':'.$udom} = $outcome;
- }
- if (ref($results) eq 'HASH') {
- foreach my $uname (keys(%{$results})) {
- $inst_results->{$uname.':'.$udom} = $results->{$uname};
- }
- }
- }
- }
+ ($inst_response,%{$inst_results->{$user}}) =
+ &Apache::lonnet::get_instuser($udom,$uname);
+ return;
}
- } elsif (keys(%{$usershash}) == 1) {
- my $user = (keys(%{$usershash}))[0];
- my ($uname,$udom) = split(/:/,$user);
- if (($udom ne '') && ($uname ne '')) {
- if (ref($usershash->{$user}) eq 'HASH') {
- if (ref($checks) eq 'HASH') {
- if (defined($checks->{'username'})) {
- ($inst_response{$user},%{$inst_results->{$user}}) =
- &Apache::lonnet::get_instuser($udom,$uname);
- } elsif (defined($checks->{'id'})) {
- if ($usershash->{$user}->{'id'} ne '') {
- ($inst_response{$user},%{$inst_results->{$user}}) =
- &Apache::lonnet::get_instuser($udom,undef,
- $usershash->{$user}->{'id'});
- } else {
- ($inst_response{$user},%{$inst_results->{$user}}) =
- &Apache::lonnet::get_instuser($udom,$uname);
- }
+ if (!$got_rules->{$udom}) {
+ my %domconfig = &Apache::lonnet::get_dom('configuration',
+ ['usercreation'],$udom);
+ if (ref($domconfig{'usercreation'}) eq 'HASH') {
+ foreach my $item ('username','id') {
+ if (ref($domconfig{'usercreation'}{$item.'_rule'}) eq 'ARRAY') {
+ $$curr_rules{$udom}{$item} =
+ $domconfig{'usercreation'}{$item.'_rule'};
}
- } else {
- ($inst_response{$user},%{$inst_results->{$user}}) =
- &Apache::lonnet::get_instuser($udom,$uname);
- return;
- }
- if (!$got_rules->{$udom}) {
- my %domconfig = &Apache::lonnet::get_dom('configuration',
- ['usercreation'],$udom);
- if (ref($domconfig{'usercreation'}) eq 'HASH') {
- foreach my $item ('username','id') {
- if (ref($domconfig{'usercreation'}{$item.'_rule'}) eq 'ARRAY') {
- $$curr_rules{$udom}{$item} =
- $domconfig{'usercreation'}{$item.'_rule'};
- }
- }
- }
- $got_rules->{$udom} = 1;
}
}
- } else {
- return;
- }
- } else {
- return;
- }
- foreach my $user (keys(%{$usershash})) {
- my ($uname,$udom) = split(/:/,$user);
- next if (($udom eq '') || ($uname eq ''));
- my $id;
- if (ref($inst_results) eq 'HASH') {
- if (ref($inst_results->{$user}) eq 'HASH') {
- $id = $inst_results->{$user}->{'id'};
- }
- }
- if ($id eq '') {
- if (ref($usershash->{$user})) {
- $id = $usershash->{$user}->{'id'};
- }
+ $got_rules->{$udom} = 1;
}
foreach my $item (keys(%{$checks})) {
if (ref($$curr_rules{$udom}) eq 'HASH') {
if (ref($$curr_rules{$udom}{$item}) eq 'ARRAY') {
if (@{$$curr_rules{$udom}{$item}} > 0) {
- my %rule_check = &Apache::lonnet::inst_rulecheck($udom,$uname,$id,$item,
- $$curr_rules{$udom}{$item});
+ my %rule_check = &Apache::lonnet::inst_rulecheck($udom,$uname,$id,$item,$$curr_rules{$udom}{$item});
foreach my $rule (@{$$curr_rules{$udom}{$item}}) {
if ($rule_check{$rule}) {
$$rulematch{$user}{$item} = $rule;
- if ($inst_response{$user} eq 'ok') {
+ if ($inst_response eq 'ok') {
if (ref($inst_results) eq 'HASH') {
if (ref($inst_results->{$user}) eq 'HASH') {
if (keys(%{$inst_results->{$user}}) == 0) {
$$alerts{$item}{$udom}{$uname} = 1;
- } elsif ($item eq 'id') {
- if ($inst_results->{$user}->{'id'} eq '') {
- $$alerts{$item}{$udom}{$uname} = 1;
- }
}
}
}
@@ -11636,14 +9426,7 @@ sub personal_data_fieldtitles {
sub sorted_inst_types {
my ($dom) = @_;
- my ($usertypes,$order);
- my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
- if (ref($domdefaults{'inststatus'}) eq 'HASH') {
- $usertypes = $domdefaults{'inststatus'}{'inststatustypes'};
- $order = $domdefaults{'inststatus'}{'inststatusorder'};
- } else {
- ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom);
- }
+ my ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom);
my $othertitle = &mt('All users');
if ($env{'request.course.id'}) {
$othertitle = &mt('Any users');
@@ -11664,15 +9447,11 @@ sub sorted_inst_types {
}
sub get_institutional_codes {
- my ($cdom,$crs,$settings,$allcourses,$LC_code) = @_;
+ my ($settings,$allcourses,$LC_code) = @_;
# Get complete list of course sections to update
my @currsections = ();
my @currxlists = ();
- my (%unclutteredsec,%unclutteredlcsec);
my $coursecode = $$settings{'internal.coursecode'};
- my $crskey = $crs.':'.$coursecode;
- @{$unclutteredsec{$crskey}} = ();
- @{$unclutteredlcsec{$crskey}} = ();
if ($$settings{'internal.sectionnums'} ne '') {
@currsections = split(/,/,$$settings{'internal.sectionnums'});
@@ -11683,37 +9462,24 @@ sub get_institutional_codes {
}
if (@currxlists > 0) {
- foreach my $xl (@currxlists) {
- if ($xl =~ /^([^:]+):(\w*)$/) {
+ foreach (@currxlists) {
+ if (m/^([^:]+):(\w*)$/) {
unless (grep/^$1$/,@{$allcourses}) {
- push(@{$allcourses},$1);
+ push @{$allcourses},$1;
$$LC_code{$1} = $2;
}
}
}
}
-
+
if (@currsections > 0) {
- foreach my $sec (@currsections) {
- if ($sec =~ m/^(\w+):(\w*)$/ ) {
- my $instsec = $1;
+ foreach (@currsections) {
+ if (m/^(\w+):(\w*)$/) {
+ my $sec = $coursecode.$1;
my $lc_sec = $2;
- unless (grep/^\Q$instsec\E$/,@{$unclutteredsec{$crskey}}) {
- push(@{$unclutteredsec{$crskey}},$instsec);
- push(@{$unclutteredlcsec{$crskey}},$lc_sec);
- }
- }
- }
- }
-
- if (@{$unclutteredsec{$crskey}} > 0) {
- my %formattedsec = &Apache::lonnet::auto_instsec_reformat($cdom,'clutter',\%unclutteredsec);
- if ((ref($formattedsec{$crskey}) eq 'ARRAY') && (ref($unclutteredlcsec{$crskey}) eq 'ARRAY')) {
- for (my $i=0; $i<@{$formattedsec{$crskey}}; $i++) {
- my $sec = $coursecode.$formattedsec{$crskey}[$i];
- unless (grep/^\Q$sec\E$/,@{$allcourses}) {
- push(@{$allcourses},$sec);
- $$LC_code{$sec} = $unclutteredlcsec{$crskey}[$i];
+ unless (grep/^$sec$/,@{$allcourses}) {
+ push @{$allcourses},$sec;
+ $$LC_code{$sec} = $lc_sec;
}
}
}
@@ -11810,9 +9576,7 @@ reservable_now - ref to hash of student_
Keys in inner hash are:
(a) symb: either blank or symb to which slot use is restricted.
- (b) endreserve: end date of reservation period.
- (c) uniqueperiod: start,end dates when slot is to be uniquely
- selected.
+ (b) endreserve: end date of reservation period.
sorted_future - ref to array of student_schedulable slots reservable in
the future, ordered by start date of reservation period.
@@ -11823,8 +9587,6 @@ future_reservable - ref to hash of stude
Keys in inner hash are:
(a) symb: either blank or symb to which slot use is restricted.
(b) startreserve: start date of reservation period.
- (c) uniqueperiod: start,end dates when slot is to be uniquely
- selected.
=back
@@ -11878,10 +9640,6 @@ sub get_future_slots {
my $startreserve = $slots{$slot}->{'startreserve'};
my $endreserve = $slots{$slot}->{'endreserve'};
my $symb = $slots{$slot}->{'symb'};
- my $uniqueperiod;
- if (ref($slots{$slot}->{'uniqueperiod'}) eq 'ARRAY') {
- $uniqueperiod = join(',',@{$slots{$slot}->{'uniqueperiod'}});
- }
if (($startreserve < $now) &&
(!$endreserve || $endreserve > $now)) {
my $lastres = $endreserve;
@@ -11890,15 +9648,13 @@ sub get_future_slots {
}
$reservable_now{$slot} = {
symb => $symb,
- endreserve => $lastres,
- uniqueperiod => $uniqueperiod,
+ endreserve => $lastres
};
} elsif (($startreserve > $now) &&
(!$endreserve || $endreserve > $startreserve)) {
$future_reservable{$slot} = {
symb => $symb,
- startreserve => $startreserve,
- uniqueperiod => $uniqueperiod,
+ startreserve => $startreserve
};
}
}
@@ -12079,7 +9835,7 @@ sub ask_for_embedded_content {
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
}
- if (($actionurl eq '/adm/portfolio') ||
+ if (($actionurl eq '/adm/portfolio') ||
($actionurl eq '/adm/coursegrp_portfolio')) {
my $current_path='/';
if ($env{'form.currentpath'}) {
@@ -12111,18 +9867,18 @@ sub ask_for_embedded_content {
$toplevel = $url;
if ($args->{'context'} eq 'paste') {
($cdom,$cnum) = ($url =~ m{^\Q/uploaded/\E($match_domain)/($match_courseid)/});
- ($path) =
+ ($path) =
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/});
$fileloc = &Apache::lonnet::filelocation('',$toplevel);
$fileloc =~ s{^/}{};
}
}
- } elsif ($actionurl eq '/adm/dependencies') {
+ } elsif ($actionurl eq '/adm/dependencies') {
if ($env{'request.course.id'} ne '') {
if (ref($args) eq 'HASH') {
$url = $args->{'docs_url'};
$title = $args->{'docs_title'};
- $toplevel = $url;
+ $toplevel = $url;
unless ($toplevel =~ m{^/}) {
$toplevel = "/$url";
}
@@ -12133,15 +9889,7 @@ sub ask_for_embedded_content {
($path) =
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/});
}
- if ($toplevel=~/^\/*(uploaded|editupload)/) {
- $fileloc = $toplevel;
- $fileloc=~ s/^\s*(\S+)\s*$/$1/;
- my ($udom,$uname,$fname) =
- ($fileloc=~ m{^/+(?:uploaded|editupload)/+($match_domain)/+($match_name)/+(.*)$});
- $fileloc = propath($udom,$uname).'/userfiles/'.$fname;
- } else {
- $fileloc = &Apache::lonnet::filelocation('',$toplevel);
- }
+ $fileloc = &Apache::lonnet::filelocation('',$toplevel);
$fileloc =~ s{^/}{};
($filename) = ($fileloc =~ m{.+/([^/]+)$});
$heading = &mt('Status of dependencies in [_1]',"$title ($filename)");
@@ -12201,8 +9949,8 @@ sub ask_for_embedded_content {
my $dirptr = 16384;
foreach my $path (keys(%subdependencies)) {
$currsubfile{$path} = {};
- if (($actionurl eq '/adm/portfolio') ||
- ($actionurl eq '/adm/coursegrp_portfolio')) {
+ if (($actionurl eq '/adm/portfolio') ||
+ ($actionurl eq '/adm/coursegrp_portfolio')) {
my ($sublistref,$listerror) =
&Apache::lonnet::dirlist($url.$path,$udom,$uname,$getpropath);
if (ref($sublistref) eq 'ARRAY') {
@@ -12344,7 +10092,7 @@ sub ask_for_embedded_content {
$counter = scalar(keys(%existing));
$numpathchg = scalar(keys(%pathchanges));
return ($output,$counter,$numpathchg,\%existing);
- } elsif (($actionurl eq "/public/$cdom/$cnum/syllabus") &&
+ } elsif (($actionurl eq "/public/$cdom/$cnum/syllabus") &&
(ref($args) eq 'HASH') && ($args->{'context'} eq 'rewrites')) {
$counter = scalar(keys(%existing));
$numpathchg = scalar(keys(%pathchanges));
@@ -12573,7 +10321,7 @@ sub ask_for_embedded_content {
Performs clean-up of directories, subdirectories and filename in an
embedded object, referenced in an HTML file which is being uploaded
-to a course or portfolio, where
+to a course or portfolio, where
"Upload embedded images/multimedia files if HTML file" checkbox was
checked.
@@ -12592,7 +10340,7 @@ sub clean_path {
@contents = ($embed_file);
}
my $lastidx = scalar(@contents)-1;
- for (my $i=0; $i<=$lastidx; $i++) {
+ for (my $i=0; $i<=$lastidx; $i++) {
$contents[$i]=~s{\\}{/}g;
$contents[$i]=~s/\s+/\_/g;
$contents[$i]=~s{[^/\w\.\-]}{}g;
@@ -12931,7 +10679,7 @@ sub modify_html_refs {
}
my (%allfiles,%codebase,$output,$content);
my @changes = &get_env_multiple('form.namechange');
- unless ((@changes > 0) || ($context eq 'syllabus')) {
+ unless ((@changes > 0) || ($context eq 'syllabus')) {
if (wantarray) {
return ('',0,0);
} else {
@@ -12963,7 +10711,7 @@ sub modify_html_refs {
return;
}
}
- if (open(my $fh,'<',$container)) {
+ if (open(my $fh,"<$container")) {
$content = join('', <$fh>);
close($fh);
} else {
@@ -13028,7 +10776,7 @@ sub modify_html_refs {
}
}
} else {
- if (open(my $fh,'>',$container)) {
+ if (open(my $fh,">$container")) {
print $fh $content;
close($fh);
$output = '
'.&mt('Updated [quant,_1,reference] in [_2].',
@@ -13066,7 +10814,7 @@ sub modify_html_refs {
}
}
if ($rewrites) {
- my $saveresult;
+ my $saveresult;
my $url = &Apache::lonnet::store_edited_file($container,$content,$udom,$uname,\$saveresult);
if ($url eq $container) {
my ($fname) = ($container =~ m{/([^/]+)$});
@@ -13187,7 +10935,7 @@ sub check_for_upload {
if (($current_disk_usage + $filesize) > $disk_quota){
my $msg = '
'.
&mt('Unable to upload [_1]. (size = [_2] kilobytes). Disk quota will be exceeded.',''.$fname.'',$filesize).'
'.
- '
'.&mt('Disk quota is [_1] kilobytes. Your current disk usage is [_2] kilobytes.',$disk_quota,$current_disk_usage).'
';
+ ' '.&mt('Disk quota is [_1] kilobytes. Your current disk usage is [_2] kilobytes.',$disk_quota,$current_disk_usage);
return ('will_exceed_quota',$msg);
} elsif ($found_file) {
if ($locked_file) {
@@ -13297,7 +11045,7 @@ sub decompress_form {
"$topdir/media/player.swf",
"$topdir/media/swfobject.js",
"$topdir/media/expressInstall.swf");
- my @camtasia8_1 = ("$topdir/","$topdir/$topdir.html",
+ my @camtasia8 = ("$topdir/","$topdir/$topdir.html",
"$topdir/$topdir.mp4",
"$topdir/$topdir\_config.xml",
"$topdir/$topdir\_controller.swf",
@@ -13319,36 +11067,13 @@ sub decompress_form {
"$topdir/skins/express_show/",
"$topdir/skins/express_show/player-min.css",
"$topdir/skins/express_show/spritesheet.png");
- my @camtasia8_4 = ("$topdir/","$topdir/$topdir.html",
- "$topdir/$topdir.mp4",
- "$topdir/$topdir\_config.xml",
- "$topdir/$topdir\_controller.swf",
- "$topdir/$topdir\_embed.css",
- "$topdir/$topdir\_First_Frame.png",
- "$topdir/$topdir\_player.html",
- "$topdir/$topdir\_Thumbnails.png",
- "$topdir/playerProductInstall.swf",
- "$topdir/scripts/",
- "$topdir/scripts/config_xml.js",
- "$topdir/scripts/techsmith-smart-player.min.js",
- "$topdir/skins/",
- "$topdir/skins/configuration_express.xml",
- "$topdir/skins/express_show/",
- "$topdir/skins/express_show/spritesheet.min.css",
- "$topdir/skins/express_show/spritesheet.png",
- "$topdir/skins/express_show/techsmith-smart-player.min.css");
my @diffs = &compare_arrays(\@paths,\@camtasia6);
if (@diffs == 0) {
$is_camtasia = 6;
} else {
- @diffs = &compare_arrays(\@paths,\@camtasia8_1);
+ @diffs = &compare_arrays(\@paths,\@camtasia8);
if (@diffs == 0) {
$is_camtasia = 8;
- } else {
- @diffs = &compare_arrays(\@paths,\@camtasia8_4);
- if (@diffs == 0) {
- $is_camtasia = 8;
- }
}
}
}
@@ -13362,6 +11087,7 @@ function camtasiaToggle() {
for (var i=0; i'.&mt('Not extracted.').' '.
- &mt('Unexpected file path.').'
';
$itemcount ++;
@@ -16150,15 +13618,12 @@ path - Array containing all categories b
currcategories - reference to array of current categories assigned to the course
-disabled - scalar (optional) contains disabled="disabled" if input elements are
- to be readonly (e.g., Domain Helpdesk role viewing course settings).
-
Returns: $output (markup to be displayed).
=cut
sub assign_category_rows {
- my ($itemcount,$cats,$depth,$parent,$path,$currcategories,$disabled) = @_;
+ my ($itemcount,$cats,$depth,$parent,$path,$currcategories) = @_;
my ($text,$name,$item,$chgstr);
if (ref($cats) eq 'ARRAY') {
my $maxdepth = scalar(@{$cats});
@@ -16181,12 +13646,12 @@ sub assign_category_rows {
}
$text .= '
';
@@ -16198,12 +13663,6 @@ sub assign_category_rows {
return $text;
}
-=pod
-
-=back
-
-=cut
-
############################################################
############################################################
@@ -16285,7 +13744,7 @@ sub commit_studentrole {
}
$oldsecurl = $uurl;
$expire_role_result =
- &Apache::lonnet::assignrole($udom,$uname,$uurl,'st',$now,'','','',$context);
+ &Apache::lonnet::assignrole($udom,$uname,$uurl,'st',$now,'','',$context);
if ($env{'request.course.sec'} ne '') {
if ($expire_role_result eq 'refused') {
my @roles = ('st');
@@ -16334,7 +13793,7 @@ sub commit_studentrole {
}
}
} else {
- if ($secchange) {
+ if ($secchange) {
$$logmsg .= &mt('Error when attempting section change for [_1] from old section "[_2]" to new section: "[_3]" in course [_4] -error:',$uname,$oldsec,$sec,$cid).' '.$modify_section_result.$linefeed;
} else {
$$logmsg .= &mt('Error when attempting to modify role for [_1] for section: "[_2]" in course [_3] -error:',$uname,$sec,$cid).' '.$modify_section_result.$linefeed;
@@ -16397,8 +13856,7 @@ sub check_clone {
my $cloneid='/'.$args->{'clonedomain'}.'/'.$args->{'clonecourse'};
my ($clonecrsudom,$clonecrsunum)= &LONCAPA::split_courseid($cloneid);
my $clonehome=&Apache::lonnet::homeserver($clonecrsunum,$clonecrsudom);
- my $clonetitle;
- my @clonemsg;
+ my $clonemsg;
my $can_clone = 0;
my $lctype = lc($args->{'crstype'});
if ($lctype ne 'community') {
@@ -16406,154 +13864,59 @@ sub check_clone {
}
if ($clonehome eq 'no_host') {
if ($args->{'crstype'} eq 'Community') {
- push(@clonemsg,({
- mt => 'No new community created.',
- args => [],
- },
- {
- mt => 'A new community could not be cloned from the specified original - [_1] - because it is a non-existent community.',
- args => [$args->{'clonedomain'}.':'.$args->{'clonedomain'}],
- }));
+ $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a non-existent community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
} else {
- push(@clonemsg,({
- mt => 'No new course created.',
- args => [],
- },
- {
- mt => 'A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',
- args => [$args->{'clonecourse'}.':'.$args->{'clonedomain'}],
- }));
- }
+ $clonemsg = &mt('No new course created.').$linefeed.&mt('A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
+ }
} else {
my %clonedesc = &Apache::lonnet::coursedescription($cloneid,{'one_time' => 1});
- $clonetitle = $clonedesc{'description'};
if ($args->{'crstype'} eq 'Community') {
if ($clonedesc{'type'} ne 'Community') {
- push(@clonemsg,({
- mt => 'No new community created.',
- args => [],
- },
- {
- mt => 'A new community could not be cloned from the specified original - [_1] - because it is a course not a community.',
- args => [$args->{'clonecourse'}.':'.$args->{'clonedomain'}],
- }));
- return ($can_clone,\@clonemsg,$cloneid,$clonehome);
+ $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a course not a community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
+ return ($can_clone, $clonemsg, $cloneid, $clonehome);
}
}
- if (($env{'request.role.domain'} eq $args->{'clonedomain'}) &&
+ if (($env{'request.role.domain'} eq $args->{'clonedomain'}) &&
(&Apache::lonnet::allowed('ccc',$env{'request.role.domain'}))) {
$can_clone = 1;
} else {
- my %clonehash = &Apache::lonnet::get('environment',['cloners','internal.coursecode'],
+ my %clonehash = &Apache::lonnet::get('environment',['cloners'],
$args->{'clonedomain'},$args->{'clonecourse'});
- if ($clonehash{'cloners'} eq '') {
- my %domdefs = &Apache::lonnet::get_domain_defaults($args->{'course_domain'});
- if ($domdefs{'canclone'}) {
- unless ($domdefs{'canclone'} eq 'none') {
- if ($domdefs{'canclone'} eq 'domain') {
- if ($args->{'ccdomain'} eq $args->{'clonedomain'}) {
- $can_clone = 1;
- }
- } elsif (($clonehash{'internal.coursecode'}) && ($args->{'crscode'}) &&
- ($args->{'clonedomain'} eq $args->{'course_domain'})) {
- if (&Apache::lonnet::default_instcode_cloning($args->{'clonedomain'},$domdefs{'canclone'},
- $clonehash{'internal.coursecode'},$args->{'crscode'})) {
- $can_clone = 1;
- }
- }
- }
- }
+ my @cloners = split(/,/,$clonehash{'cloners'});
+ if (grep(/^\*$/,@cloners)) {
+ $can_clone = 1;
+ } elsif (grep(/^\*\:\Q$args->{'ccdomain'}\E$/,@cloners)) {
+ $can_clone = 1;
} else {
- my @cloners = split(/,/,$clonehash{'cloners'});
- if (grep(/^\*$/,@cloners)) {
- $can_clone = 1;
- } elsif (grep(/^\*\:\Q$args->{'ccdomain'}\E$/,@cloners)) {
- $can_clone = 1;
- } elsif (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners)) {
- $can_clone = 1;
- }
- unless ($can_clone) {
- if (($clonehash{'internal.coursecode'}) && ($args->{'crscode'}) &&
- ($args->{'clonedomain'} eq $args->{'course_domain'})) {
- my (%gotdomdefaults,%gotcodedefaults);
- foreach my $cloner (@cloners) {
- if (($cloner ne '*') && ($cloner !~ /^\*\:$match_domain$/) &&
- ($cloner !~ /^$match_username\:$match_domain$/) && ($cloner ne '')) {
- my (%codedefaults,@code_order);
- if (ref($gotcodedefaults{$args->{'clonedomain'}}) eq 'HASH') {
- if (ref($gotcodedefaults{$args->{'clonedomain'}}{'defaults'}) eq 'HASH') {
- %codedefaults = %{$gotcodedefaults{$args->{'clonedomain'}}{'defaults'}};
- }
- if (ref($gotcodedefaults{$args->{'clonedomain'}}{'order'}) eq 'ARRAY') {
- @code_order = @{$gotcodedefaults{$args->{'clonedomain'}}{'order'}};
- }
- } else {
- &Apache::lonnet::auto_instcode_defaults($args->{'clonedomain'},
- \%codedefaults,
- \@code_order);
- $gotcodedefaults{$args->{'clonedomain'}}{'defaults'} = \%codedefaults;
- $gotcodedefaults{$args->{'clonedomain'}}{'order'} = \@code_order;
- }
- if (@code_order > 0) {
- if (&Apache::lonnet::check_instcode_cloning(\%codedefaults,\@code_order,
- $cloner,$clonehash{'internal.coursecode'},
- $args->{'crscode'})) {
- $can_clone = 1;
- last;
- }
- }
- }
- }
- }
- }
- }
- unless ($can_clone) {
my $ccrole = 'cc';
if ($args->{'crstype'} eq 'Community') {
$ccrole = 'co';
}
- my %roleshash =
- &Apache::lonnet::get_my_roles($args->{'ccuname'},
- $args->{'ccdomain'},
- 'userroles',['active'],[$ccrole],
- [$args->{'clonedomain'}]);
- if ($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) {
+ my %roleshash =
+ &Apache::lonnet::get_my_roles($args->{'ccuname'},
+ $args->{'ccdomain'},
+ 'userroles',['active'],[$ccrole],
+ [$args->{'clonedomain'}]);
+ if (($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) || (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners))) {
$can_clone = 1;
- } elsif (&Apache::lonnet::is_course_owner($args->{'clonedomain'},$args->{'clonecourse'},
- $args->{'ccuname'},$args->{'ccdomain'})) {
+ } elsif (&Apache::lonnet::is_course_owner($args->{'clonedomain'},$args->{'clonecourse'},$args->{'ccuname'},$args->{'ccdomain'})) {
$can_clone = 1;
- }
- }
- unless ($can_clone) {
- if ($args->{'crstype'} eq 'Community') {
- push(@clonemsg,({
- mt => 'No new community created.',
- args => [],
- },
- {
- mt => 'The new community could not be cloned from the existing community because the new community owner ([_1]) does not have cloning rights in the existing community ([_2]).',
- args => [$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'}],
- }));
} else {
- push(@clonemsg,({
- mt => 'No new course created.',
- args => [],
- },
- {
- mt => 'The new course could not be cloned from the existing course because the new course owner ([_1]) does not have cloning rights in the existing course ([_2]).',
- args => [$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'}],
- }));
+ if ($args->{'crstype'} eq 'Community') {
+ $clonemsg = &mt('No new community created.').$linefeed.&mt('The new community could not be cloned from the existing community because the new community owner ([_1]) does not have cloning rights in the existing community ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'});
+ } else {
+ $clonemsg = &mt('No new course created.').$linefeed.&mt('The new course could not be cloned from the existing course because the new course owner ([_1]) does not have cloning rights in the existing course ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'});
+ }
}
}
}
}
- return ($can_clone,\@clonemsg,$cloneid,$clonehome,$clonetitle);
+ return ($can_clone, $clonemsg, $cloneid, $clonehome);
}
sub construct_course {
- my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context,
- $cnum,$category,$coderef,$callercontext,$user_lh) = @_;
- my ($outcome,$msgref,$clonemsgref);
+ my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context,$cnum,$category,$coderef) = @_;
+ my $outcome;
my $linefeed = ' '."\n";
if ($context eq 'auto') {
$linefeed = "\n";
@@ -16562,11 +13925,18 @@ sub construct_course {
#
# Are we cloning?
#
- my ($can_clone,$cloneid,$clonehome,$clonetitle);
+ my ($can_clone, $clonemsg, $cloneid, $clonehome);
if (($args->{'clonecourse'}) && ($args->{'clonedomain'})) {
- ($can_clone,$clonemsgref,$cloneid,$clonehome,$clonetitle) = &check_clone($args,$linefeed);
+ ($can_clone, $clonemsg, $cloneid, $clonehome) = &check_clone($args,$linefeed);
+ if ($context ne 'auto') {
+ if ($clonemsg ne '') {
+ $clonemsg = ''.$clonemsg.'';
+ }
+ }
+ $outcome .= $clonemsg.$linefeed;
+
if (!$can_clone) {
- return (0,$outcome,$clonemsgref);
+ return (0,$outcome);
}
}
@@ -16584,20 +13954,15 @@ sub construct_course {
$args->{'ccuname'}.':'.
$args->{'ccdomain'},
$args->{'crstype'},
- $cnum,$context,$category,
- $callercontext);
+ $cnum,$context,$category);
# Note: The testing routines depend on this being output; see
# Utils::Course. This needs to at least be output as a comment
# if anyone ever decides to not show this, and Utils::Course::new
# will need to be suitably modified.
- if (($callercontext eq 'auto') && ($user_lh ne '')) {
- $outcome .= &mt_user($user_lh,'New LON-CAPA [_1] ID: [_2]',$crstype,$$courseid).$linefeed;
- } else {
- $outcome .= &mt('New LON-CAPA [_1] ID: [_2]',$crstype,$$courseid).$linefeed;
- }
+ $outcome .= &mt('New LON-CAPA [_1] ID: [_2]',$crstype,$$courseid).$linefeed;
if ($$courseid =~ /^error:/) {
- return (0,$outcome,$clonemsgref);
+ return (0,$outcome);
}
#
@@ -16606,37 +13971,23 @@ sub construct_course {
($$crsudom,$$crsunum)= &LONCAPA::split_courseid($$courseid);
my $crsuhome=&Apache::lonnet::homeserver($$crsunum,$$crsudom);
if ($crsuhome eq 'no_host') {
- if (($callercontext eq 'auto') && ($user_lh ne '')) {
- $outcome .= &mt_user($user_lh,
- 'Course creation failed, unrecognized course home server.');
- } else {
- $outcome .= &mt('Course creation failed, unrecognized course home server.');
- }
- $outcome .= $linefeed;
- return (0,$outcome,$clonemsgref);
+ $outcome .= &mt('Course creation failed, unrecognized course home server.').$linefeed;
+ return (0,$outcome);
}
$outcome .= &mt('Created on').': '.$crsuhome.$linefeed;
#
# Do the cloning
-#
- my @clonemsg;
+#
if ($can_clone && $cloneid) {
- push(@clonemsg,
- {
- mt => 'Created [_1] by cloning from [_2]',
- args => [$crstype,$clonetitle],
- });
+ $clonemsg = &mt('Cloning [_1] from [_2]',$crstype,$clonehome);
+ if ($context ne 'auto') {
+ $clonemsg = ''.$clonemsg.'';
+ }
+ $outcome .= $clonemsg.$linefeed;
my %oldcenv=&Apache::lonnet::dump('environment',$$crsudom,$$crsunum);
# Copy all files
- my @info =
- &Apache::lonclonecourse::copycoursefiles($cloneid,$$courseid,$args->{'datemode'},
- $args->{'dateshift'},$args->{'crscode'},
- $args->{'ccuname'}.':'.$args->{'ccdomain'},
- $args->{'tinyurls'});
- if (@info) {
- push(@clonemsg,@info);
- }
+ &Apache::lonclonecourse::copycoursefiles($cloneid,$$courseid,$args->{'datemode'},$args->{'dateshift'});
# Restore URL
$cenv{'url'}=$oldcenv{'url'};
# Restore title
@@ -16661,7 +14012,8 @@ sub construct_course {
'plc.users.denied',
'hidefromcat',
'checkforpriv',
- 'categories'],
+ 'categories',
+ 'internal.uniquecode'],
$$crsudom,$$crsunum);
if ($args->{'textbook'}) {
$cenv{'internal.textbook'} = $args->{'textbook'};
@@ -16676,9 +14028,6 @@ sub construct_course {
if ($args->{'crstype'}) {
$cenv{'type'}=$args->{'crstype'};
}
- if ($args->{'lti'}) {
- $cenv{'internal.lti'}=$args->{'lti'};
- }
if ($args->{'crsid'}) {
$cenv{'courseid'}=$args->{'crsid'};
}
@@ -16700,7 +14049,6 @@ sub construct_course {
$cenv{'internal.defaultcredits'} = $args->{'defaultcredits'};
}
my @badclasses = (); # Used to accumulate sections/crosslistings that did not pass classlist access check for course owner.
- my @oklcsecs = (); # Used to accumulate LON-CAPA sections for validated institutional sections.
if ($args->{'crssections'}) {
$cenv{'internal.sectionnums'} = '';
if ($args->{'crssections'} =~ m/,/) {
@@ -16714,12 +14062,8 @@ sub construct_course {
my $class = $args->{'crscode'}.$sec;
my $addcheck = &Apache::lonnet::auto_new_course($$crsunum,$$crsudom,$class,$cenv{'internal.courseowner'});
$cenv{'internal.sectionnums'} .= $item.',';
- if ($addcheck eq 'ok') {
- unless (grep(/^\Q$gp\E$/,@oklcsecs)) {
- push(@oklcsecs,$gp);
- }
- } else {
- push(@badclasses,$class);
+ unless ($addcheck eq 'ok') {
+ push @badclasses, $class;
}
}
$cenv{'internal.sectionnums'} =~ s/,$//;
@@ -16746,12 +14090,8 @@ sub construct_course {
my ($xl,$gp) = split/:/,$item;
my $addcheck = &Apache::lonnet::auto_new_course($$crsunum,$$crsudom,$xl,$cenv{'internal.courseowner'});
$cenv{'internal.crosslistings'} .= $item.',';
- if ($addcheck eq 'ok') {
- unless (grep(/^\Q$gp\E$/,@oklcsecs)) {
- push(@oklcsecs,$gp);
- }
- } else {
- push(@badclasses,$xl);
+ unless ($addcheck eq 'ok') {
+ push @badclasses, $xl;
}
}
$cenv{'internal.crosslistings'} =~ s/,$//;
@@ -16786,63 +14126,32 @@ sub construct_course {
}
if (@badclasses > 0) {
my %lt=&Apache::lonlocal::texthash(
- 'tclb' => 'The courses listed below were included as sections or crosslistings affiliated with your new LON-CAPA course.',
- 'howi' => 'However, if automated course roster updates are enabled for this class, these particular sections/crosslistings are not guaranteed to contribute towards enrollment.',
- 'itis' => 'It is possible that rights to access enrollment for these classes will be available through assignment of co-owners.',
+ 'tclb' => 'The courses listed below were included as sections or crosslistings affiliated with your new LON-CAPA course. However, if automated course roster updates are enabled for this class, these particular sections/crosslistings will not contribute towards enrollment, because the user identified as the course owner for this LON-CAPA course',
+ 'dnhr' => 'does not have rights to access enrollment in these classes',
+ 'adby' => 'as determined by the policies of your institution on access to official classlists'
);
- my $badclass_msg = $lt{'tclb'}.$linefeed.$lt{'howi'}.$linefeed.
- &mt('That is because the user identified as the course owner ([_1]) does not have rights to access enrollment in these classes, as determined by the policies of your institution on access to official classlists',$cenv{'internal.courseowner'}).$linefeed.$lt{'itis'};
+ my $badclass_msg = $cenv{'internal.courseowner'}.') - '.$lt{'dnhr'}.
+ ' ('.$lt{'adby'}.')';
if ($context eq 'auto') {
$outcome .= $badclass_msg.$linefeed;
- } else {
$outcome .= '