version 1.406.2.14.2.1, 2017/08/15 23:42:33
|
version 1.406.2.21, 2024/07/04 00:56:21
|
Line 71 use Apache::longroup;
|
Line 71 use Apache::longroup;
|
use Apache::lonuserutils; |
use Apache::lonuserutils; |
use Apache::loncoursequeueadmin; |
use Apache::loncoursequeueadmin; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
use HTML::Entities; |
|
|
my $loginscript; # piece of javascript used in two separate instances |
my $loginscript; # piece of javascript used in two separate instances |
my $authformnop; |
my $authformnop; |
Line 1486 ENDAUTH
|
Line 1487 ENDAUTH
|
($env{'request.role.domain'} eq $ccdomain)) { |
($env{'request.role.domain'} eq $ccdomain)) { |
$user_text{'requestauthor'} = &domainrole_req($ccuname,$ccdomain); |
$user_text{'requestauthor'} = &domainrole_req($ccuname,$ccdomain); |
} |
} |
$user_text{'auth'} = &user_authentication($ccuname,$ccdomain,$formname); |
$user_text{'auth'} = &user_authentication($ccuname,$ccdomain,$formname,$crstype,$permission); |
if ((&Apache::lonnet::allowed('mpq',$ccdomain)) || |
if ((&Apache::lonnet::allowed('mpq',$ccdomain)) || |
(&Apache::lonnet::allowed('mut',$ccdomain)) || |
(&Apache::lonnet::allowed('mut',$ccdomain)) || |
(&Apache::lonnet::allowed('udp',$ccdomain))) { |
(&Apache::lonnet::allowed('udp',$ccdomain))) { |
Line 2164 sub new_domain_roles {
|
Line 2165 sub new_domain_roles {
|
} |
} |
|
|
sub user_authentication { |
sub user_authentication { |
my ($ccuname,$ccdomain,$formname) = @_; |
my ($ccuname,$ccdomain,$formname,$crstype,$permission) = @_; |
my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain); |
my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain); |
my $outcome; |
my $outcome; |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
Line 2236 ENDBADAUTH
|
Line 2237 ENDBADAUTH
|
} |
} |
$outcome .= &Apache::loncommon::end_data_table(); |
$outcome .= &Apache::loncommon::end_data_table(); |
} else { |
} else { |
|
if (($currentauth =~ /^internal:/) && |
|
(&Apache::lonuserutils::can_change_internalpass($ccuname,$ccdomain,$crstype,$permission))) { |
|
$outcome = <<"ENDJS"; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
function togglePwd(form) { |
|
if (form.newintpwd.length) { |
|
if (document.getElementById('LC_ownersetpwd')) { |
|
for (var i=0; i<form.newintpwd.length; i++) { |
|
if (form.newintpwd[i].checked) { |
|
if (form.newintpwd[i].value == 1) { |
|
document.getElementById('LC_ownersetpwd').style.display = 'inline-block'; |
|
} else { |
|
document.getElementById('LC_ownersetpwd').style.display = 'none'; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
// ]]> |
|
</script> |
|
ENDJS |
|
|
|
$outcome .= '<h3>'.$lt{'ld'}.'</h3>'. |
|
&Apache::loncommon::start_data_table(). |
|
&Apache::loncommon::start_data_table_row(). |
|
'<td>'.&mt('Internally authenticated').'<br />'.&mt("Change user's password?"). |
|
'<label><input type="radio" name="newintpwd" value="0" checked="checked" onclick="togglePwd(this.form);" />'. |
|
&mt('No').'</label>'.(' 'x2). |
|
'<label><input type="radio" name="newintpwd" value="1" onclick="togglePwd(this.form);" />'.&mt('Yes').'</label>'. |
|
'<div id="LC_ownersetpwd" style="display:none">'. |
|
' '.&mt('Password').' <input type="password" size="15" name="intarg" value="" />'. |
|
'<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.intarg.type='."'text'".' } else { this.form.intarg.type='."'password'".' }" />'.&mt('Visible input').'</label></div></td>'. |
|
&Apache::loncommon::end_data_table_row(). |
|
&Apache::loncommon::end_data_table(); |
|
} |
if (&Apache::lonnet::allowed('udp',$ccdomain)) { |
if (&Apache::lonnet::allowed('udp',$ccdomain)) { |
# Current user has rights to view domain preferences for user's domain |
# Current user has rights to view domain preferences for user's domain |
my $result; |
my $result; |
Line 2344 sub modify_login_block {
|
Line 2382 sub modify_login_block {
|
} |
} |
|
|
sub personal_data_display { |
sub personal_data_display { |
my ($ccuname,$ccdomain,$newuser,$context,$inst_results,$rolesarray, |
my ($ccuname,$ccdomain,$newuser,$context,$inst_results,$rolesarray,$now, |
$now,$captchaform,$emailusername,$usertype,$usernameset,$condition,$excluded) = @_; |
$captchaform,$emailusername,$usertype,$usernameset,$condition,$excluded,$showsubmit) = @_; |
my ($output,%userenv,%canmodify,%canmodify_status); |
my ($output,%userenv,%canmodify,%canmodify_status); |
my @userinfo = ('firstname','middlename','lastname','generation', |
my @userinfo = ('firstname','middlename','lastname','generation', |
'permanentemail','id'); |
'permanentemail','id'); |
Line 2470 sub personal_data_display {
|
Line 2508 sub personal_data_display {
|
if ($usernameset eq 'free') { |
if ($usernameset eq 'free') { |
my $onclick = "toggleUsernameDisp(this,'selfcreateusername');"; |
my $onclick = "toggleUsernameDisp(this,'selfcreateusername');"; |
$output .= &Apache::lonhtmlcommon::row_title($lt{'username'},undef,'LC_oddrow_value')."\n". |
$output .= &Apache::lonhtmlcommon::row_title($lt{'username'},undef,'LC_oddrow_value')."\n". |
&mt('Use e-mail address: '). |
'<span class="LC_nobreak">'.&mt('Use e-mail address: '). |
'<label><input type="radio" name="emailused" value="1" checked="checked" onclick="'.$onclick.'" />'.&mt('Yes').'</label>'."\n". |
'<label><input type="radio" name="emailused" value="1" checked="checked" onclick="'.$onclick.'" />'. |
(' 'x2). |
&mt('Yes').'</label>'.(' 'x2). |
'<label><input type="radio" name="emailused" value="0" onclick="'.$onclick.'" />'.&mt('No').'</label>'."\n". |
'<label><input type="radio" name="emailused" value="0" onclick="'.$onclick.'" />'. |
|
&mt('No').'</label></span>'."\n". |
'<div id="selfcreateusername" style="display: none; font-size: smaller">'. |
'<div id="selfcreateusername" style="display: none; font-size: smaller">'. |
'<br /><span class="LC_nobreak">'.&mt('Preferred username'). |
'<br /><span class="LC_nobreak">'.&mt('Preferred username'). |
' <input type="text" name="username" value="" size="20" autocomplete="off"/>'. |
' <input type="text" name="username" value="" size="20" autocomplete="off"/>'. |
Line 2581 sub personal_data_display {
|
Line 2620 sub personal_data_display {
|
&Apache::lonhtmlcommon::row_closure(1); |
&Apache::lonhtmlcommon::row_closure(1); |
$rowcount ++; |
$rowcount ++; |
} |
} |
my $submit_text = &mt('Create account'); |
if ($showsubmit) { |
$output .= &Apache::lonhtmlcommon::row_title()."\n". |
my $submit_text = &mt('Create account'); |
'<br /><input type="submit" name="createaccount" value="'. |
$output .= &Apache::lonhtmlcommon::row_title()."\n". |
$submit_text.'" />'. |
'<br /><input type="submit" name="createaccount" value="'. |
'<input type="hidden" name="type" value="'.$usertype.'" />'. |
$submit_text.'" />'; |
&Apache::lonhtmlcommon::row_closure(1); |
if ($usertype ne '') { |
|
$output .= '<input type="hidden" name="type" value="'.$usertype.'" />'. |
|
&Apache::lonhtmlcommon::row_closure(1); |
|
} |
|
} |
} |
} |
$output .= &Apache::lonhtmlcommon::end_pick_box(); |
$output .= &Apache::lonhtmlcommon::end_pick_box(); |
if (wantarray) { |
if (wantarray) { |
Line 2670 sub get_inststatuses {
|
Line 2713 sub get_inststatuses {
|
|
|
# ================================================================= Phase Three |
# ================================================================= Phase Three |
sub update_user_data { |
sub update_user_data { |
my ($r,$context,$crstype,$brcrum,$showcredits) = @_; |
my ($r,$context,$crstype,$brcrum,$showcredits,$permission) = @_; |
my $uhome=&Apache::lonnet::homeserver($env{'form.ccuname'}, |
my $uhome=&Apache::lonnet::homeserver($env{'form.ccuname'}, |
$env{'form.ccdomain'}); |
$env{'form.ccdomain'}); |
# Error messages |
# Error messages |
Line 2936 sub update_user_data {
|
Line 2979 sub update_user_data {
|
$env{'form.ccdomain'},$env{'form.ccuname'}); |
$env{'form.ccdomain'},$env{'form.ccuname'}); |
} |
} |
} |
} |
$r->print('<br />'.&mt('Home server').': '.$uhome.' '. |
$r->print('<br />'.&mt('Home Server').': '.$uhome.' '. |
&Apache::lonnet::hostname($uhome)); |
&Apache::lonnet::hostname($uhome)); |
} elsif (($env{'form.login'} ne 'nochange') && |
} elsif (($env{'form.login'} ne 'nochange') && |
($env{'form.login'} ne '' )) { |
($env{'form.login'} ne '' )) { |
Line 2951 sub update_user_data {
|
Line 2994 sub update_user_data {
|
&Apache::lonnet::modifyuserauth( |
&Apache::lonnet::modifyuserauth( |
$env{'form.ccdomain'},$env{'form.ccuname'}, |
$env{'form.ccdomain'},$env{'form.ccuname'}, |
$amode,$genpwd)); |
$amode,$genpwd)); |
$r->print('<br />'.&mt('Home server').': '.&Apache::lonnet::homeserver |
$r->print('<br />'.&mt('Home Server').': '.&Apache::lonnet::homeserver |
($env{'form.ccuname'},$env{'form.ccdomain'})); |
($env{'form.ccuname'},$env{'form.ccdomain'})); |
} else { |
} else { |
# Okay, this is a non-fatal error. |
# Okay, this is a non-fatal error. |
$r->print($error.&mt('You do not have the authority to modify this users authentication information.').$end); |
$r->print($error.&mt('You do not have privileges to modify the authentication configuration for this user.').$end); |
} |
} |
|
} elsif (($env{'form.intarg'} ne '') && |
|
(&Apache::lonnet::queryauthenticate($env{'form.ccuname'},$env{'form.ccdomain'}) =~ /^internal:/) && |
|
(&Apache::lonuserutils::can_change_internalpass($env{'form.ccuname'},$env{'form.ccdomain'},$crstype,$permission))) { |
|
$r->print('Modifying authentication: '. |
|
&Apache::lonnet::modifyuserauth( |
|
$env{'form.ccdomain'},$env{'form.ccuname'}, |
|
'internal',$env{'form.intarg'})); |
} |
} |
$r->rflush(); # Finish display of header before time consuming actions start |
$r->rflush(); # Finish display of header before time consuming actions start |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state); |
Line 4620 sub handler {
|
Line 4670 sub handler {
|
if (&Apache::lonnet::auto_run($cnum,$cdom) && (($permission->{'cusr'}) || ($permission->{'view'}))) { |
if (&Apache::lonnet::auto_run($cnum,$cdom) && (($permission->{'cusr'}) || ($permission->{'view'}))) { |
push(@allhelp,'Course_Automated_Enrollment'); |
push(@allhelp,'Course_Automated_Enrollment'); |
} |
} |
if ($permission->{'selfenrolladmin'}) { |
if (($permission->{'selfenrolladmin'}) || ($permission->{'selfenrollview'})) { |
push(@allhelp,'Course_Approve_Selfenroll'); |
push(@allhelp,'Course_Approve_Selfenroll'); |
} |
} |
} |
} |
Line 4722 sub handler {
|
Line 4772 sub handler {
|
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
} elsif ($env{'form.state'} eq 'got_file') { |
} elsif ($env{'form.state'} eq 'got_file') { |
&Apache::lonuserutils::print_upload_manager_form($r,$context,$permission, |
my $result = |
$crstype,$showcredits); |
&Apache::lonuserutils::print_upload_manager_form($r,$context, |
|
$permission, |
|
$crstype,$showcredits); |
|
if ($result eq 'missingdata') { |
|
delete($env{'form.state'}); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
|
} |
} elsif ($env{'form.state'} eq 'enrolling') { |
} elsif ($env{'form.state'} eq 'enrolling') { |
if ($env{'form.datatoken'}) { |
if ($env{'form.datatoken'}) { |
&Apache::lonuserutils::upfile_drop_add($r,$context,$permission, |
my $result = &Apache::lonuserutils::upfile_drop_add($r,$context, |
$showcredits); |
$permission, |
|
$showcredits); |
|
if ($result eq 'missingdata') { |
|
delete($env{'form.state'}); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
|
} elsif ($result eq 'invalidhome') { |
|
$env{'form.state'} = 'got_file'; |
|
delete($env{'form.lcserver'}); |
|
my $result = |
|
&Apache::lonuserutils::print_upload_manager_form($r,$context,$permission, |
|
$crstype,$showcredits); |
|
if ($result eq 'missingdata') { |
|
delete($env{'form.state'}); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
|
} |
|
} |
|
} else { |
|
delete($env{'form.state'}); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
} |
} |
} else { |
} else { |
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
&Apache::lonuserutils::print_first_users_upload_form($r,$context); |
} |
} |
|
$r->print('</form>'); |
} elsif (((($env{'form.action'} eq 'singleuser') || ($env{'form.action'} |
} elsif (((($env{'form.action'} eq 'singleuser') || ($env{'form.action'} |
eq 'singlestudent')) && ($permission->{'cusr'})) || |
eq 'singlestudent')) && ($permission->{'cusr'})) || |
(($env{'form.action'} eq 'singleuser') && ($permission->{'view'})) || |
(($env{'form.action'} eq 'singleuser') && ($permission->{'view'})) || |
Line 4837 sub handler {
|
Line 4912 sub handler {
|
&print_useraccesslogs_display($r,$ccuname,$ccdomain,$permission,$brcrum); |
&print_useraccesslogs_display($r,$ccuname,$ccdomain,$permission,$brcrum); |
} |
} |
} elsif ($env{'form.phase'} eq 'update_user_data') { |
} elsif ($env{'form.phase'} eq 'update_user_data') { |
&update_user_data($r,$context,$crstype,$brcrum,$showcredits); |
&update_user_data($r,$context,$crstype,$brcrum,$showcredits,$permission); |
} else { |
} else { |
&print_username_entry_form($r,$context,undef,$srch,undef,$crstype, |
&print_username_entry_form($r,$context,undef,$srch,undef,$crstype, |
$brcrum,$permission); |
$brcrum,$permission); |
Line 5135 sub handler {
|
Line 5210 sub handler {
|
'<span class="LC_error">'.&mt('You do not have permission to modify dates or sections for users').'</span>'); |
'<span class="LC_error">'.&mt('You do not have permission to modify dates or sections for users').'</span>'); |
} |
} |
} elsif ($env{'form.action'} eq 'selfenroll') { |
} elsif ($env{'form.action'} eq 'selfenroll') { |
if ($permission->{selfenrolladmin}) { |
my %currsettings; |
my %currsettings = ( |
if ($permission->{selfenrolladmin} || $permission->{selfenrollview}) { |
|
%currsettings = ( |
selfenroll_types => $env{'course.'.$cid.'.internal.selfenroll_types'}, |
selfenroll_types => $env{'course.'.$cid.'.internal.selfenroll_types'}, |
selfenroll_registered => $env{'course.'.$cid.'.internal.selfenroll_registered'}, |
selfenroll_registered => $env{'course.'.$cid.'.internal.selfenroll_registered'}, |
selfenroll_section => $env{'course.'.$cid.'.internal.selfenroll_section'}, |
selfenroll_section => $env{'course.'.$cid.'.internal.selfenroll_section'}, |
Line 5152 sub handler {
|
Line 5228 sub handler {
|
default_enrollment_end_date => $env{'course.'.$cid.'.default_enrollment_end_date'}, |
default_enrollment_end_date => $env{'course.'.$cid.'.default_enrollment_end_date'}, |
uniquecode => $env{'course.'.$cid.'.internal.uniquecode'}, |
uniquecode => $env{'course.'.$cid.'.internal.uniquecode'}, |
); |
); |
|
} |
|
if ($permission->{selfenrolladmin}) { |
push(@{$brcrum}, |
push(@{$brcrum}, |
{href => '/adm/createuser?action=selfenroll', |
{href => '/adm/createuser?action=selfenroll', |
text => "Configure Self-enrollment", |
text => "Configure Self-enrollment", |
Line 5172 sub handler {
|
Line 5250 sub handler {
|
$r->print('<h3>'.&mt('Self-enrollment with a student role').'</h3>'."\n"); |
$r->print('<h3>'.&mt('Self-enrollment with a student role').'</h3>'."\n"); |
&update_selfenroll_config($r,$cid,$cdom,$cnum,$context,$crstype,\%currsettings); |
&update_selfenroll_config($r,$cid,$cdom,$cnum,$context,$crstype,\%currsettings); |
} |
} |
|
} elsif ($permission->{selfenrollview}) { |
|
push(@{$brcrum}, |
|
{href => '/adm/createuser?action=selfenroll', |
|
text => "View Self-enrollment configuration", |
|
help => 'Course_Self_Enrollment'}); |
|
$args = { bread_crumbs => $brcrum, |
|
bread_crumbs_component => 'Self-enrollment Settings'}; |
|
$r->print(&header(undef,$args)); |
|
$r->print('<h3>'.&mt('Self-enrollment with a student role').'</h3>'."\n"); |
|
&print_selfenroll_menu($r,'course',$cid,$cdom,$cnum,\%currsettings,'',1); |
} else { |
} else { |
$r->print(&header(undef,{'no_nav_bar' => 1}). |
$r->print(&header(undef,{'no_nav_bar' => 1}). |
'<span class="LC_error">'.&mt('You do not have permission to configure self-enrollment').'</span>'); |
'<span class="LC_error">'.&mt('You do not have permission to configure self-enrollment').'</span>'); |
Line 5677 sub print_main_menu {
|
Line 5765 sub print_main_menu {
|
icon => 'selfenrl-queue.png', |
icon => 'selfenrl-queue.png', |
#help => 'Course_Approve_Selfenroll', |
#help => 'Course_Approve_Selfenroll', |
url => '/adm/createuser?action=selfenrollqueue', |
url => '/adm/createuser?action=selfenrollqueue', |
permission => $permission->{'selfenrolladmin'}, |
permission => $permission->{'selfenrolladmin'} || $permission->{'selfenrollview'}, |
linktitle =>'Approve or reject enrollment requests.', |
linktitle =>'Approve or reject enrollment requests.', |
}, |
}, |
); |
); |
Line 5704 sub print_main_menu {
|
Line 5792 sub print_main_menu {
|
icon => 'self_enroll.png', |
icon => 'self_enroll.png', |
#help => 'Course_Self_Enrollment', |
#help => 'Course_Self_Enrollment', |
url => '/adm/createuser?action=selfenroll', |
url => '/adm/createuser?action=selfenroll', |
permission => $permission->{'selfenrolladmin'}, |
permission => $permission->{'selfenrolladmin'} || $permission->{'selfenrollview'}, |
linktitle => 'Configure user self-enrollment.', |
linktitle => 'Configure user self-enrollment.', |
}, |
}, |
); |
); |
Line 5953 ENDSCRIPT
|
Line 6041 ENDSCRIPT
|
'// ]]>'."\n". |
'// ]]>'."\n". |
'</script>'."\n". |
'</script>'."\n". |
'<h3>'.$lt->{'selfenroll'}.'</h3>'."\n"; |
'<h3>'.$lt->{'selfenroll'}.'</h3>'."\n"; |
|
my $visactions = &cat_visibility($cdom); |
my $visactions = &cat_visibility(); |
|
my ($cathash,%cattype); |
my ($cathash,%cattype); |
my %domconfig = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom); |
my %domconfig = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom); |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
Line 6499 sub visible_in_stdcat {
|
Line 6586 sub visible_in_stdcat {
|
} |
} |
|
|
sub cat_visibility { |
sub cat_visibility { |
|
my ($cdom) = @_; |
my %visactions = &Apache::lonlocal::texthash( |
my %visactions = &Apache::lonlocal::texthash( |
vis => 'This course/community currently appears in the Course/Community Catalog for this domain.', |
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.', |
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.', |
Line 6511 sub cat_visibility {
|
Line 6599 sub cat_visibility {
|
dc_chgconf => 'Ask a domain coordinator to change the Catalog type for this domain.', |
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_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_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_addinst => 'Ask a domain coordinator to enable catalog display of "Official courses (with institutional codes)".', |
dc_instcode => 'Ask a domain coordinator to assign an institutional code (if this is an official course).', |
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_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_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_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.', |
dc_addcat => 'Ask a domain coordinator to assign a category to the course.', |
); |
); |
|
if ($env{'request.role'} eq "dc./$cdom/") { |
|
$visactions{'dc_chgconf'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to change the Catalog type for this domain.','»'); |
|
$visactions{'dc_setcode'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to assign a six character code to the course.','»'); |
|
$visactions{'dc_unhide'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to change the "Exclude from course catalog" setting.','»'); |
|
$visactions{'dc_addinst'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to enable catalog display of "Official courses (with institutional codes)".','»'); |
|
$visactions{'dc_instcode'} = &mt('Use: "Main menu" [_1] "View or modify a course or community" [_1] "View/Modify course owner, institutional code ... " to assign an institutional code (if this is an official course).','»'); |
|
$visactions{'dc_catalog'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to enable or create at least one course category in the domain.','»'); |
|
$visactions{'dc_categories'} = &mt('Use: "Main menu" [_1] "Set domain configuration" [_1] "Cataloging of courses/communities" to create a hierarchy of categories and sub categories for courses in the domain.','»'); |
|
$visactions{'dc_chgcat'} = &mt('Use: "Main menu" [_1] "View or modify a course or community" [_1] "View/Modify catalog settings for course" to change the category assigned to the course, as the one currently assigned is no longer used in the domain.','»'); |
|
$visactions{'dc_addcat'} = &mt('Use: "Main menu" [_1] "View or modify a course or community" [_1] "View/Modify catalog settings for course" to assign a category to the course.','»'); |
|
} |
$visactions{'unhide'} = &mt('Use [_1]Categorize course[_2] to change the "Exclude from course catalog" setting.','<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
$visactions{'unhide'} = &mt('Use [_1]Categorize course[_2] to change the "Exclude from course catalog" setting.','<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
$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.','"<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
$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.','"<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
$visactions{'addcat'} = &mt('Use [_1]Categorize course[_2] to assign a category to the course.','"<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
$visactions{'addcat'} = &mt('Use [_1]Categorize course[_2] to assign a category to the course.','"<a href="/adm/courseprefs?phase=display&actions=courseinfo">','</a>"'); |
Line 7008 ENDSCRIPT
|
Line 7107 ENDSCRIPT
|
my ($nav_script,$nav_links); |
my ($nav_script,$nav_links); |
|
|
# table header |
# table header |
my $tableheader = '<h3>'. |
my $heading = '<h3>'. |
&mt('User access logs for: [_1]', |
&mt('User access logs for: [_1]', |
&Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom)).'</h3>' |
&Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom)).'</h3>'; |
|
my $tableheader = $heading |
.&Apache::loncommon::start_data_table_header_row() |
.&Apache::loncommon::start_data_table_header_row() |
.'<th> </th>' |
.'<th> </th>' |
.'<th>'.&mt('When').'</th>' |
.'<th>'.&mt('When').'</th>' |
Line 7128 ENDSCRIPT
|
Line 7228 ENDSCRIPT
|
$r->print(&Apache::loncommon::end_data_table(). |
$r->print(&Apache::loncommon::end_data_table(). |
&userlogdisplay_navlinks(\%curr,$more_records)); |
&userlogdisplay_navlinks(\%curr,$more_records)); |
} else { # No content displayed above |
} else { # No content displayed above |
$r->print('<p class="LC_info">' |
$r->print($heading.'<p class="LC_info">' |
.&mt('There are no records to display.') |
.&mt('There are no records to display.') |
.'</p>'); |
.'</p>'); |
} |
} |
Line 7317 sub role_display_filter {
|
Line 7417 sub role_display_filter {
|
&mt('Context:').'</b><br /><select name="chgcontext">'; |
&mt('Context:').'</b><br /><select name="chgcontext">'; |
my @posscontexts; |
my @posscontexts; |
if ($context eq 'course') { |
if ($context eq 'course') { |
@posscontexts = ('any','automated','updatenow','createcourse','course','domain','selfenroll','requestcourses'); |
@posscontexts = ('any','automated','updatenow','createcourse','course','domain','selfenroll','requestcourses','chgtype'); |
} elsif ($context eq 'domain') { |
} elsif ($context eq 'domain') { |
@posscontexts = ('any','domain','requestauthor','domconfig','server'); |
@posscontexts = ('any','domain','requestauthor','domconfig','server'); |
} else { |
} else { |
@posscontexts = ('any','author','domain'); |
@posscontexts = ('any','author','domain'); |
} |
} |
foreach my $chgtype (@posscontexts) { |
foreach my $chgtype (@posscontexts) { |
my $selstr = ''; |
my $selstr = ''; |
if ($curr->{'chgcontext'} eq $chgtype) { |
if ($curr->{'chgcontext'} eq $chgtype) { |
Line 7366 sub rolechg_contexts {
|
Line 7466 sub rolechg_contexts {
|
%lt = &Apache::lonlocal::texthash ( |
%lt = &Apache::lonlocal::texthash ( |
any => 'Any', |
any => 'Any', |
automated => 'Automated Enrollment', |
automated => 'Automated Enrollment', |
|
chgtype => 'Enrollment Type/Lock Change', |
updatenow => 'Roster Update', |
updatenow => 'Roster Update', |
createcourse => 'Course Creation', |
createcourse => 'Course Creation', |
course => 'User Management in course', |
course => 'User Management in course', |
Line 9471 sub update_selfenroll_config {
|
Line 9572 sub update_selfenroll_config {
|
} else { |
} else { |
$r->print(&mt('No changes were made to the existing self-enrollment settings in this course.')); |
$r->print(&mt('No changes were made to the existing self-enrollment settings in this course.')); |
} |
} |
my $visactions = &cat_visibility(); |
my $visactions = &cat_visibility($cdom); |
my ($cathash,%cattype); |
my ($cathash,%cattype); |
my %domconfig = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom); |
my %domconfig = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom); |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |