'.
' '.
@@ -5956,42 +6145,51 @@ ENDSCRIPT
$output .= &Apache::lonhtmlcommon::end_pick_box().
' '
- .' ';
+ .' '
+ .' '."\n".
+ $additional.'';
$r->print($output);
return;
}
-sub visible_in_cat {
- my ($cdom,$cnum) = @_;
- my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom);
- my ($cathash,%settable,@vismsgs,$cansetvis);
- my %visactions = &Apache::lonlocal::texthash(
- vis => 'Your course/community currently appears in the Course/Community Catalog for this domain.',
- gen => 'Courses can be both self-cataloging, based on an institutional code (e.g., fs08phy231), or can be assigned categories from a hierarchy defined for the domain.',
- miss => 'Your course/community does not currently appear in the Course/Community Catalog for this domain.',
- yous => 'You should remedy this if you plan to allow self-enrollment, otherwise students will have difficulty finding your course.',
- coca => 'Courses can be absent from the Catalog, because they do not have an institutional code, have no assigned category, or have been specifically excluded.',
- make => 'Make any changes to self-enrollment settings below, click "Save", then take action to include the course in the Catalog:',
- take => 'Take the following action to ensure the course appears in the Catalog:',
- dc_unhide => 'Ask a domain coordinator to change the "Exclude from course catalog" setting.',
- dc_addinst => 'Ask a domain coordinator to enable display the catalog of "Official courses (with institutional codes)".',
- dc_instcode => 'Ask a domain coordinator to assign an institutional code (if this is an official course).',
- dc_catalog => 'Ask a domain coordinator to enable or create at least one course category in the domain.',
- dc_categories => 'Ask a domain coordinator to create a hierarchy of categories and sub categories for courses in the domain.',
- dc_chgcat => 'Ask a domain coordinator to change the category assigned to the course, as the one currently assigned is no longer used in the domain',
- dc_addcat => 'Ask a domain coordinator to assign a category to the course.',
- );
- $visactions{'unhide'} = &mt('Use [_1]Categorize course[_2] to change the "Exclude from course catalog" setting.','',' "');
- $visactions{'chgcat'} = &mt('Use [_1]Categorize course[_2] to change the category assigned to the course, as the one currently assigned is no longer used in the domain.','"',' "');
- $visactions{'addcat'} = &mt('Use [_1]Categorize course[_2] to assign a category to the course.','"',' "');
- if (ref($domconf{'coursecategories'}) eq 'HASH') {
- if ($domconf{'coursecategories'}{'togglecats'} eq 'crs') {
+sub get_noedit_fields {
+ my ($cdom,$cnum,$crstype,$row) = @_;
+ my %noedit;
+ if (ref($row) eq 'ARRAY') {
+ my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.textbook',
+ 'internal.selfenrollmgrdc',
+ 'internal.selfenrollmgrcc'],$cdom,$cnum);
+ my $type = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$crstype,\%settings);
+ my (%specific_managebydc,%specific_managebycc,%default_managebydc);
+ map { $specific_managebydc{$_} = 1; } (split(/,/,$settings{'internal.selfenrollmgrdc'}));
+ map { $specific_managebycc{$_} = 1; } (split(/,/,$settings{'internal.selfenrollmgrcc'}));
+ my %domdefaults = &Apache::lonnet::get_domain_defaults($cdom);
+ map { $default_managebydc{$_} = 1; } (split(/,/,$domdefaults{$type.'selfenrolladmdc'}));
+
+ foreach my $item (@{$row}) {
+ next if ($specific_managebycc{$item});
+ if (($specific_managebydc{$item}) || ($default_managebydc{$item})) {
+ $noedit{$item} = 1;
+ }
+ }
+ }
+ return %noedit;
+}
+
+sub visible_in_stdcat {
+ my ($cdom,$cnum,$domconf) = @_;
+ my ($cathash,%settable,@vismsgs,$cansetvis,$visible);
+ unless (ref($domconf) eq 'HASH') {
+ return ($visible,$cansetvis,\@vismsgs);
+ }
+ if (ref($domconf->{'coursecategories'}) eq 'HASH') {
+ if ($domconf->{'coursecategories'}{'togglecats'} eq 'crs') {
$settable{'togglecats'} = 1;
}
- if ($domconf{'coursecategories'}{'categorize'} eq 'crs') {
+ if ($domconf->{'coursecategories'}{'categorize'} eq 'crs') {
$settable{'categorize'} = 1;
}
- $cathash = $domconf{'coursecategories'}{'cats'};
+ $cathash = $domconf->{'coursecategories'}{'cats'};
}
if ($settable{'togglecats'} && $settable{'categorize'}) {
$cansetvis = &mt('You are able to both assign a course category and choose to exclude this course from the catalog.');
@@ -6006,10 +6204,10 @@ sub visible_in_cat {
my %currsettings =
&Apache::lonnet::get('environment',['hidefromcat','categories','internal.coursecode'],
$cdom,$cnum);
- my $visible = 0;
+ $visible = 0;
if ($currsettings{'internal.coursecode'} ne '') {
- if (ref($domconf{'coursecategories'}) eq 'HASH') {
- $cathash = $domconf{'coursecategories'}{'cats'};
+ if (ref($domconf->{'coursecategories'}) eq 'HASH') {
+ $cathash = $domconf->{'coursecategories'}{'cats'};
if (ref($cathash) eq 'HASH') {
if ($cathash->{'instcode::0'} eq '') {
push(@vismsgs,'dc_addinst');
@@ -6033,8 +6231,8 @@ sub visible_in_cat {
}
if ($currsettings{'categories'} ne '') {
my $cathash;
- if (ref($domconf{'coursecategories'}) eq 'HASH') {
- $cathash = $domconf{'coursecategories'}{'cats'};
+ if (ref($domconf->{'coursecategories'}) eq 'HASH') {
+ $cathash = $domconf->{'coursecategories'}{'cats'};
if (ref($cathash) eq 'HASH') {
if (keys(%{$cathash}) == 0) {
push(@vismsgs,'dc_catalog');
@@ -6080,7 +6278,33 @@ sub visible_in_cat {
unshift(@vismsgs,'dc_unhide')
}
}
- return ($visible,$cansetvis,\@vismsgs,\%visactions);
+ return ($visible,$cansetvis,\@vismsgs);
+}
+
+sub cat_visibility {
+ my %visactions = &Apache::lonlocal::texthash(
+ vis => 'This course/community currently appears in the Course/Community Catalog for this domain.',
+ gen => 'Courses can be both self-cataloging, based on an institutional code (e.g., fs08phy231), or can be assigned categories from a hierarchy defined for the domain.',
+ miss => 'This course/community does not currently appear in the Course/Community Catalog for this domain.',
+ none => 'Display of a course catalog is disabled for this domain.',
+ yous => 'You should remedy this if you plan to allow self-enrollment, otherwise students will have difficulty finding this course.',
+ coca => 'Courses can be absent from the Catalog, because they do not have an institutional code, have no assigned category, or have been specifically excluded.',
+ make => 'Make any changes to self-enrollment settings below, click "Save", then take action to include the course in the Catalog:',
+ take => 'Take the following action to ensure the course appears in the Catalog:',
+ dc_chgconf => 'Ask a domain coordinator to change the Catalog type for this domain.',
+ dc_setcode => 'Ask a domain coordinator to assign a six character code to the course',
+ dc_unhide => 'Ask a domain coordinator to change the "Exclude from course catalog" setting.',
+ dc_addinst => 'Ask a domain coordinator to enable display the catalog of "Official courses (with institutional codes)".',
+ dc_instcode => 'Ask a domain coordinator to assign an institutional code (if this is an official course).',
+ dc_catalog => 'Ask a domain coordinator to enable or create at least one course category in the domain.',
+ dc_categories => 'Ask a domain coordinator to create a hierarchy of categories and sub categories for courses in the domain.',
+ dc_chgcat => 'Ask a domain coordinator to change the category assigned to the course, as the one currently assigned is no longer used in the domain',
+ dc_addcat => 'Ask a domain coordinator to assign a category to the course.',
+ );
+ $visactions{'unhide'} = &mt('Use [_1]Categorize course[_2] to change the "Exclude from course catalog" setting.','',' "');
+ $visactions{'chgcat'} = &mt('Use [_1]Categorize course[_2] to change the category assigned to the course, as the one currently assigned is no longer used in the domain.','"',' "');
+ $visactions{'addcat'} = &mt('Use [_1]Categorize course[_2] to assign a category to the course.','"',' "');
+ return \%visactions;
}
sub new_selfenroll_dom_row {
@@ -7093,13 +7317,13 @@ sub course_level_table {
((($role eq 'cc') || ($role eq 'co')) && ($isowner))) {
$table .= &course_level_row($protectedcourse,$role,$area,$domain,
$plrole,\%sections_count,\%lt,
- $defaultcredits,$crstype);
+ $showcredits,$defaultcredits,$crstype);
} elsif ($env{'request.course.sec'} ne '') {
if (&Apache::lonnet::allowed('c'.$role,$thiscourse.'/'.
$env{'request.course.sec'})) {
$table .= &course_level_row($protectedcourse,$role,$area,$domain,
$plrole,\%sections_count,\%lt,
- $defaultcredits,$crstype);
+ $showcredits,$defaultcredits,$crstype);
}
}
}
@@ -7108,7 +7332,8 @@ sub course_level_table {
next if ($crstype eq 'Community' && $customroles{$cust} =~ /bre\&S/);
my $role = 'cr_cr_'.$env{'user.domain'}.'_'.$env{'user.name'}.'_'.$cust;
$table .= &course_level_row($protectedcourse,$role,$area,$domain,
- $cust,\%sections_count,\%lt);
+ $cust,\%sections_count,\%lt,
+ $showcredits,$defaultcredits,$crstype);
}
}
}
@@ -7122,7 +7347,11 @@ sub course_level_table {
&Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
''.$lt{'act'}.' '.$lt{'rol'}.' '."\n".
-''.$lt{'ext'}.' '.$lt{'crd'}.' '."\n".
+''.$lt{'ext'}.' '."\n";
+ if ($showcredits) {
+ $result .= $lt{'crd'}.' ';
+ }
+ $result .=
''.$lt{'grs'}.' '.$lt{'sta'}.' '."\n".
''.$lt{'end'}.' '.
&Apache::loncommon::end_data_table_header_row().
@@ -7133,14 +7362,14 @@ $table.
sub course_level_row {
my ($protectedcourse,$role,$area,$domain,$plrole,$sections_count,
- $lt,$defaultcredits,$crstype) = @_;
+ $lt,$showcredits,$defaultcredits,$crstype) = @_;
my $creditem;
my $row = &Apache::loncommon::start_data_table_row().
' '."\n".
' '.$plrole.' '."\n".
' '.$area.' Domain: '.$domain.' '."\n";
- if (($role eq 'st') && ($crstype eq 'Course')) {
+ if (($showcredits) && ($role eq 'st') && ($crstype eq 'Course')) {
$row .=
' ';
@@ -7229,8 +7458,8 @@ sub course_level_dc {
my $plrole=&Apache::lonnet::plaintext($role);
$otheritems .= ' '.$plrole.' ';
}
- if ( keys %customroles > 0) {
- foreach my $cust (sort keys %customroles) {
+ if ( keys(%customroles) > 0) {
+ foreach my $cust (sort(keys(%customroles))) {
my $custrole='cr_cr_'.$env{'user.domain'}.
'_'.$env{'user.name'}.'_'.$cust;
$otheritems .= ' '.$cust.' ';
@@ -7265,19 +7494,23 @@ ENDTIMEENTRY
}
sub update_selfenroll_config {
- my ($r,$context,$permission) = @_;
- my ($row,$lt) = &get_selfenroll_titles();
- my %curr_groups = &Apache::longroup::coursegroups();
+ my ($r,$cid,$cdom,$cnum,$context,$crstype,$currsettings) = @_;
+ return unless (ref($currsettings) eq 'HASH');
+ my ($row,$lt) = &Apache::lonuserutils::get_selfenroll_titles();
+ my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum);
my (%changes,%warning);
- my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
- my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
my $curr_types;
+ my %noedit;
+ unless ($context eq 'domain') {
+ %noedit = &get_noedit_fields($cdom,$cnum,$crstype,$row);
+ }
if (ref($row) eq 'ARRAY') {
foreach my $item (@{$row}) {
+ next if ($noedit{$item});
if ($item eq 'enroll_dates') {
my (%currenrolldate,%newenrolldate);
foreach my $type ('start','end') {
- $currenrolldate{$type} = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_'.$type.'_date'};
+ $currenrolldate{$type} = $currsettings->{'selfenroll_'.$type.'_date'};
$newenrolldate{$type} = &Apache::lonhtmlcommon::get_date_from_form('selfenroll_'.$type.'_date');
if ($newenrolldate{$type} ne $currenrolldate{$type}) {
$changes{'internal.selfenroll_'.$type.'_date'} = $newenrolldate{$type};
@@ -7286,15 +7519,14 @@ sub update_selfenroll_config {
} elsif ($item eq 'access_dates') {
my (%currdate,%newdate);
foreach my $type ('start','end') {
- $currdate{$type} = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_'.$type.'_access'};
+ $currdate{$type} = $currsettings->{'selfenroll_'.$type.'_access'};
$newdate{$type} = &Apache::lonhtmlcommon::get_date_from_form('selfenroll_'.$type.'_access');
if ($newdate{$type} ne $currdate{$type}) {
$changes{'internal.selfenroll_'.$type.'_access'} = $newdate{$type};
}
}
} elsif ($item eq 'types') {
- $curr_types =
- $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_'.$item};
+ $curr_types = $currsettings->{'selfenroll_'.$item};
if ($env{'form.selfenroll_all'}) {
if ($curr_types ne '*') {
$changes{'internal.selfenroll_types'} = '*';
@@ -7363,9 +7595,9 @@ sub update_selfenroll_config {
my $newlimit = $env{'form.selfenroll_limit'};
my $newcap = $env{'form.selfenroll_cap'};
$newcap =~s/\s+//g;
- my $currlimit = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_limit'};
+ my $currlimit = $currsettings->{'selfenroll_limit'};
$currlimit = 'none' if ($currlimit eq '');
- my $currcap = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_cap'};
+ my $currcap = $currsettings->{'selfenroll_cap'};
if ($newlimit ne $currlimit) {
if ($newlimit ne 'none') {
if ($newcap =~ /^\d+$/) {
@@ -7374,7 +7606,8 @@ sub update_selfenroll_config {
}
$changes{'internal.selfenroll_limit'} = $newlimit;
} else {
- $warning{$item} = &mt('Maximum enrollment setting unchanged.').' '.&mt('The value provided was invalid - it must be a positive integer if enrollment is being limited.');
+ $warning{$item} = &mt('Maximum enrollment setting unchanged.').' '.
+ &mt('The value provided was invalid - it must be a positive integer if enrollment is being limited.');
}
} elsif ($currcap ne '') {
$changes{'internal.selfenroll_cap'} = '';
@@ -7386,13 +7619,14 @@ sub update_selfenroll_config {
$changes{'internal.selfenroll_cap'} = $newcap;
}
} else {
- $warning{$item} = &mt('Maximum enrollment setting unchanged.').' '.&mt('The value provided was invalid - it must be a positive integer if enrollment is being limited.');
+ $warning{$item} = &mt('Maximum enrollment setting unchanged.').' '.
+ &mt('The value provided was invalid - it must be a positive integer if enrollment is being limited.');
}
}
} elsif ($item eq 'approval') {
my (@currnotified,@newnotified);
- my $currapproval = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_approval'};
- my $currnotifylist = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_notifylist'};
+ my $currapproval = $currsettings->{'selfenroll_approval'};
+ my $currnotifylist = $currsettings->{'selfenroll_notifylist'};
if ($currnotifylist ne '') {
@currnotified = split(/,/,$currnotifylist);
@currnotified = sort(@currnotified);
@@ -7428,14 +7662,14 @@ sub update_selfenroll_config {
}
}
} else {
- my $curr_val =
- $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_'.$item};
+ my $curr_val = $currsettings->{'selfenroll_'.$item};
my $newval = $env{'form.selfenroll_'.$item};
if ($item eq 'section') {
$newval = $env{'form.sections'};
if (defined($curr_groups{$newval})) {
$newval = $curr_val;
- $warning{$item} = &mt('Section for self-enrolled users unchanged as the proposed section is a group').' '.&mt('Group names and section names must be distinct');
+ $warning{$item} = &mt('Section for self-enrolled users unchanged as the proposed section is a group').' '.
+ &mt('Group names and section names must be distinct');
} elsif ($newval eq 'all') {
$newval = $curr_val;
$warning{$item} = &mt('Section for self-enrolled users unchanged, as "all" is a reserved section name.');
@@ -7465,11 +7699,10 @@ sub update_selfenroll_config {
my %crsinfo = &Apache::lonnet::courseiddump($cdom,'.',1,'.','.',
$cnum,undef,undef,'Course');
my $chome = &Apache::lonnet::homeserver($cnum,$cdom);
- if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') {
+ if (ref($crsinfo{$cid}) eq 'HASH') {
foreach my $item ('selfenroll_types','selfenroll_start_date','selfenroll_end_date') {
if (exists($changes{'internal.'.$item})) {
- $crsinfo{$env{'request.course.id'}}{$item} =
- $changes{'internal.'.$item};
+ $crsinfo{$cid}{$item} = $changes{'internal.'.$item};
}
}
my $crsputresult =
@@ -7506,7 +7739,7 @@ sub update_selfenroll_config {
if ($changes{'internal.selfenroll_cap'} ne '') {
$newcap = $changes{'internal.selfenroll_cap'}
} else {
- $newcap = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_cap'};
+ $newcap = $currsettings->{'selfenroll_cap'};
}
if ($changes{'internal.selfenroll_limit'} eq 'none') {
$newval = &mt('No limit');
@@ -7516,7 +7749,7 @@ sub update_selfenroll_config {
} elsif ($changes{'internal.selfenroll_limit'} eq 'selfenrolled') {
$newval = &mt('New self-enrollment no longer allowed when total number of self-enrolled students reaches [_1].',$newcap);
} else {
- my $currlimit = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_limit'};
+ my $currlimit = $currsettings->{'selfenroll_limit'};
if ($currlimit eq 'allstudents') {
$newval = &mt('New self-enrollment no longer allowed when total (all students) reaches [_1].',$newcap);
} elsif ($changes{'internal.selfenroll_limit'} eq 'selfenrolled') {
@@ -7528,24 +7761,24 @@ sub update_selfenroll_config {
} elsif ($item eq 'approval') {
if ((exists($changes{'internal.selfenroll_approval'})) ||
(exists($changes{'internal.selfenroll_notifylist'}))) {
+ my %selfdescs = &Apache::lonuserutils::selfenroll_default_descs();
my ($newval,$newnotify);
if (exists($changes{'internal.selfenroll_notifylist'})) {
$newnotify = $changes{'internal.selfenroll_notifylist'};
} else {
- $newnotify = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_notifylist'};
+ $newnotify = $currsettings->{'selfenroll_notifylist'};
}
- if ($changes{'internal.selfenroll_approval'}) {
- $newval = &mt('Yes');
- } elsif ($changes{'internal.selfenroll_approval'} eq '0') {
- $newval = &mt('No');
+ if (exists($changes{'internal.selfenroll_approval'})) {
+ if ($changes{'internal.selfenroll_approval'} !~ /^[012]$/) {
+ $changes{'internal.selfenroll_approval'} = '0';
+ }
+ $newval = $selfdescs{'approval'}{$changes{'internal.selfenroll_approval'}};
} else {
- my $currapproval =
- $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_approval'};
- if ($currapproval) {
- $newval = &mt('Yes');
- } else {
- $newval = &mt('No');
+ my $currapproval = $currsettings->{'selfenroll_approval'};
+ if ($currapproval !~ /^[012]$/) {
+ $currapproval = 0;
}
+ $newval = $selfdescs{'approval'}{$currapproval};
}
$r->print(''.&mt('"[_1]" set to "[_2]".',$title,$newval));
if ($newnotify) {
@@ -7576,13 +7809,16 @@ sub update_selfenroll_config {
}
}
$r->print('');
- my %newenvhash;
- foreach my $key (keys(%changes)) {
- $newenvhash{'course.'.$env{'request.course.id'}.'.'.$key} = $changes{$key};
+ if ($env{'course.'.$cid.'.description'} ne '') {
+ my %newenvhash;
+ foreach my $key (keys(%changes)) {
+ $newenvhash{'course.'.$cid.'.'.$key} = $changes{$key};
+ }
+ &Apache::lonnet::appenv(\%newenvhash);
}
- &Apache::lonnet::appenv(\%newenvhash);
} else {
- $r->print(&mt('An error occurred when saving changes to self-enrollment settings in this course.').' '.&mt('The error was: [_1].',$putresult));
+ $r->print(&mt('An error occurred when saving changes to self-enrollment settings in this course.').' '.
+ &mt('The error was: [_1].',$putresult));
}
} else {
$r->print(&mt('No changes were made to the existing self-enrollment settings in this course.'));
@@ -7590,39 +7826,54 @@ sub update_selfenroll_config {
} else {
$r->print(&mt('No changes were made to the existing self-enrollment settings in this course.'));
}
- my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);
- if (ref($visactions) eq 'HASH') {
- if (!$visible) {
+ my $visactions = &cat_visibility();
+ my ($cathash,%cattype);
+ my %domconfig = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom);
+ if (ref($domconfig{'coursecategories'}) eq 'HASH') {
+ $cathash = $domconfig{'coursecategories'}{'cats'};
+ $cattype{'auth'} = $domconfig{'coursecategories'}{'auth'};
+ $cattype{'unauth'} = $domconfig{'coursecategories'}{'unauth'};
+ } else {
+ $cathash = {};
+ $cattype{'auth'} = 'std';
+ $cattype{'unauth'} = 'std';
+ }
+ if (($cattype{'auth'} eq 'none') && ($cattype{'unauth'} eq 'none')) {
+ $r->print(''.$visactions->{'miss'}.' '.$visactions->{'yous'}.
+ ' '.
+ ' '.$visactions->{'take'}.''.
+ ''.$visactions->{'dc_chgconf'}.' '.
+ ' ');
+ } elsif (($cattype{'auth'} !~ /^(std|domonly)$/) && ($cattype{'unauth'} !~ /^(std|domonly)$/)) {
+ if ($currsettings->{'uniquecode'}) {
+ $r->print(''.$visactions->{'vis'}.' ');
+ } else {
$r->print(''.$visactions->{'miss'}.' '.$visactions->{'yous'}.
- ' ');
- if (ref($vismsgs) eq 'ARRAY') {
- $r->print(' '.$visactions->{'take'}.'');
- foreach my $item (@{$vismsgs}) {
- $r->print(''.$visactions->{$item}.' ');
+ ' '.
+ ' '.$visactions->{'take'}.''.
+ ''.$visactions->{'dc_setcode'}.' '.
+ ' ');
+ }
+ } else {
+ my ($visible,$cansetvis,$vismsgs) = &visible_in_stdcat($cdom,$cnum,\%domconfig);
+ if (ref($visactions) eq 'HASH') {
+ if (!$visible) {
+ $r->print(''.$visactions->{'miss'}.' '.$visactions->{'yous'}.
+ ' ');
+ if (ref($vismsgs) eq 'ARRAY') {
+ $r->print(' '.$visactions->{'take'}.'');
+ foreach my $item (@{$vismsgs}) {
+ $r->print(''.$visactions->{$item}.' ');
+ }
+ $r->print(' ');
}
- $r->print(' ');
+ $r->print($cansetvis);
}
- $r->print($cansetvis);
}
}
return;
}
-sub get_selfenroll_titles {
- my @row = ('types','registered','enroll_dates','access_dates','section',
- 'approval','limit');
- my %lt = &Apache::lonlocal::texthash (
- types => 'Users allowed to self-enroll in this course',
- registered => 'Restrict self-enrollment to students officially registered for the course',
- enroll_dates => 'Dates self-enrollment available',
- access_dates => 'Course access dates assigned to self-enrolling users',
- section => 'Section assigned to self-enrolling users',
- approval => 'Self-enrollment requests need approval?',
- limit => 'Enrollment limit',
- );
- return (\@row,\%lt);
-}
-
#---------------------------------------------- end functions for &phase_two
#--------------------------------- functions for &phase_two and &phase_three