version 1.42, 2009/02/19 22:03:13
|
version 1.45, 2009/06/09 13:26:35
|
Line 118 sub print_course_search_page {
|
Line 118 sub print_course_search_page {
|
&print_header($r); |
&print_header($r); |
my $filterlist = ['descriptfilter', |
my $filterlist = ['descriptfilter', |
'instcodefilter','ownerfilter', |
'instcodefilter','ownerfilter', |
'ownerdomfilter','coursefilter']; |
'coursefilter']; |
my $filter = {}; |
my $filter = {}; |
|
my $numtitles; |
my $type = 'Course'; |
my $type = 'Course'; |
my $action = '/adm/modifycourse'; |
my $action = '/adm/modifycourse'; |
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
Line 131 sub print_course_search_page {
|
Line 132 sub print_course_search_page {
|
'<li>'.&mt('View or modify course settings which only a [_1] may modify.' |
'<li>'.&mt('View or modify course settings which only a [_1] may modify.' |
,$dctitle).'</li>'."\n".'</ul>'); |
,$dctitle).'</li>'."\n".'</ul>'); |
$r->print(&Apache::lonpickcourse::build_filters($filterlist,$type, |
$r->print(&Apache::lonpickcourse::build_filters($filterlist,$type, |
undef,undef,$filter,$action,'modifycourse')); |
undef,undef,$filter,$action,\$numtitles,'modifycourse')); |
} |
} |
|
|
sub print_course_selection_page { |
sub print_course_selection_page { |
Line 155 sub print_course_selection_page {
|
Line 156 sub print_course_selection_page {
|
$filter{'domainfilter'} = $dom; |
$filter{'domainfilter'} = $dom; |
my %courses = &Apache::lonpickcourse::search_courses($r,$type,0, |
my %courses = &Apache::lonpickcourse::search_courses($r,$type,0, |
\%filter); |
\%filter); |
&Apache::lonpickcourse::display_matched_courses($r,$type,0,$action, |
&Apache::lonpickcourse::display_matched_courses($r,$type,0,$action,undef, |
%courses); |
%courses); |
return; |
return; |
} |
} |
Line 173 sub print_modification_menu {
|
Line 174 sub print_modification_menu {
|
); |
); |
my @menu = |
my @menu = |
( |
( |
{ text => 'Modify quota for group portfolio files', |
{ text => 'Modify quota for group portfolio', |
phase => 'setquota', |
phase => 'setquota', |
}, |
}, |
{ text => 'Display current settings for automated enrollment', |
{ text => 'Display current settings for automated enrollment', |
Line 244 sub print_settings_display {
|
Line 245 sub print_settings_display {
|
'back' => "Back to options page", |
'back' => "Back to options page", |
); |
); |
|
|
my @bgcolors = ('#eeeeee','#cccccc'); |
|
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
my $dctitle = &Apache::lonnet::plaintext('dc'); |
my $dctitle = &Apache::lonnet::plaintext('dc'); |
my @modifiable_params = &get_dc_settable(); |
my @modifiable_params = &get_dc_settable(); |
Line 270 sub print_settings_display {
|
Line 270 sub print_settings_display {
|
&print_header($r,$cdesc); |
&print_header($r,$cdesc); |
$r->print(' |
$r->print(' |
<h3>'.$lt{'caes'}.$cdesc.'</h3> |
<h3>'.$lt{'caes'}.$cdesc.'</h3> |
<p> |
|
<form action="/adm/modifycourse" method="post" name="viewparms"> |
<form action="/adm/modifycourse" method="post" name="viewparms"> |
'.$lt{'cose'}.'<ul><li>'.&mt('Settings that can be modified by a [_1] using the <a href="/adm/populate">Automated Enrollment Manager</a>.',$cctitle).'</li><li>'.&mt('Settings that may only be modified by a [_1] from this menu.',$dctitle).'</li></ul> |
<p> |
|
'.$lt{'cose'}.' |
|
<ul><li> |
|
'.&mt('Settings that can be modified by a [_1] using the [_2]Automated Enrollment Manager[_3].' |
|
,$cctitle,'<a href="/adm/populate">','</a>').' |
|
</li><li> |
|
'.&mt('Settings that may only be modified by a [_1] from this menu.',$dctitle).' |
|
</li></ul> |
</p><p> |
</p><p> |
'.$lt{'cour'}.' |
'.$lt{'cour'}.' |
</p><p> |
</p><p> |
Line 281 sub print_settings_display {
|
Line 287 sub print_settings_display {
|
<a href="javascript:changePage(document.viewparms,'."'menu'".')">'.$lt{'back'}.'</a> |
<a href="javascript:changePage(document.viewparms,'."'menu'".')">'.$lt{'back'}.'</a> |
<a href="javascript:changePage(document.viewparms,'."'setparms'".')">'.&mt('Modify [_1]-only settings',$dctitle).'</a>'."\n". |
<a href="javascript:changePage(document.viewparms,'."'setparms'".')">'.&mt('Modify [_1]-only settings',$dctitle).'</a>'."\n". |
&hidden_form_elements(). |
&hidden_form_elements(). |
'</form>'); |
'</p></form>'); |
} |
} |
|
|
sub print_setquota { |
sub print_setquota { |
Line 290 sub print_setquota {
|
Line 296 sub print_setquota {
|
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
my $cctitle = &Apache::lonnet::plaintext('cc',$type); |
my $subdiv = &mt('Although a [_1] will assign the disk quota for each individual group, the size of the quota is constrained by the total disk space allocated by the [_2] for portfolio files in a course.',$cctitle,$dctitle); |
my $subdiv = &mt('Although a [_1] will assign the disk quota for each individual group, the size of the quota is constrained by the total disk space allocated by the [_2] for portfolio files in a course.',$cctitle,$dctitle); |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'cquo' => 'Disk space for storage of group portfolio files', |
'cquo' => 'Disk space for storage of group portfolio', |
'gpqu' => 'Course portfolio files disk space', |
'gpqu' => 'Course portfolio files disk space', |
'each' => 'Each course group can be assigned a quota for portfolio files uploaded to the group.', |
'each' => 'Each course group can be assigned a quota for portfolio files uploaded to the group.', |
'modi' => 'Save', |
'modi' => 'Save', |
Line 387 sub print_course_modification_page {
|
Line 393 sub print_course_modification_page {
|
'name' => "Name", |
'name' => "Name", |
'unme' => "Username:Domain", |
'unme' => "Username:Domain", |
'stus' => "Status", |
'stus' => "Status", |
'cquo' => "Disk space for storage of group portfolio files", |
'cquo' => "Disk space for storage of group portfolio", |
'gpqu' => "Course portfolio files disk space", |
'gpqu' => "Course portfolio files disk space", |
'each' => "Each course group can be assigned a quota for portfolio files uploaded to the group.", |
'each' => "Each course group can be assigned a quota for portfolio files uploaded to the group.", |
'cose' => "Course settings for LON-CAPA courses that control automated student enrollment based on classlist data available from your institution's student information system fall into two groups: (a) settings that can be modified by a Course Coordinator using the ", |
'cose' => "Course settings for LON-CAPA courses that control automated student enrollment based on classlist data available from your institution's student information system fall into two groups: (a) settings that can be modified by a Course Coordinator using the ", |
Line 409 all settings except course code, course
|
Line 415 all settings except course code, course
|
'deus' => "The default authentication method, and default authentication parameter (domain, initial password or argument) are used when automatic enrollment of students in a course requires addition of new user accounts in your domain, and the class list file contains empty entries for the <authtype> and <autharg> properties for the new student. If you choose 'internally authenticated', and leave the initial password field empty, the automated enrollment process will create a randomized password for each new student account that it adds to your LON-CAPA domain.", |
'deus' => "The default authentication method, and default authentication parameter (domain, initial password or argument) are used when automatic enrollment of students in a course requires addition of new user accounts in your domain, and the class list file contains empty entries for the <authtype> and <autharg> properties for the new student. If you choose 'internally authenticated', and leave the initial password field empty, the automated enrollment process will create a randomized password for each new student account that it adds to your LON-CAPA domain.", |
'gobt' => "Save", |
'gobt' => "Save", |
); |
); |
my @bgcolors = ('#eeeeee','#cccccc'); |
|
|
|
my @coursepersonnel = &Apache::lonnet::getkeys('nohist_userroles',$cdom,$cnum); |
my @coursepersonnel = &Apache::lonnet::getkeys('nohist_userroles',$cdom,$cnum); |
my @local_ccs = (); |
my @local_ccs = (); |
Line 635 sub modify_course {
|
Line 640 sub modify_course {
|
} |
} |
if ( $newattr{'authtype'}=~ /^krb/) { |
if ( $newattr{'authtype'}=~ /^krb/) { |
if ($newattr{'autharg'} eq '') { |
if ($newattr{'autharg'} eq '') { |
$warning = qq(<font color="red" size="+1">). |
$warning = '<p class="LC_warning">' |
&mt("As you did not include the default Kerberos domain to be used for authentication in this class, the institutional data used by the automated enrollment process must include the Kerberos domain for each new student").qq(</font></p>); |
.&mt('As you did not include the default Kerberos domain' |
|
.' to be used for authentication in this class, the' |
|
.' institutional data used by the automated' |
|
.' enrollment process must include the Kerberos' |
|
.' domain for each new student.') |
|
.'</p>'; |
} |
} |
} |
} |
|
|
Line 783 sub modify_quota {
|
Line 793 sub modify_quota {
|
); |
); |
$r->print(' |
$r->print(' |
<form action="/adm/modifycourse" method="post" name="processquota"> |
<form action="/adm/modifycourse" method="post" name="processquota"> |
<h3>'.&mt('Disk space for storage of group portfolio files for [_1]',$cdesc). |
<h3>'.&mt('Disk space for storage of group portfolio for [_1]',$cdesc). |
'</h3>'); |
'</h3>'); |
my %oldsettings = &Apache::lonnet::get('environment',['internal.coursequota'],$cdom,$cnum); |
my %oldsettings = &Apache::lonnet::get('environment',['internal.coursequota'],$cdom,$cnum); |
my $defaultquota = 20; |
my $defaultquota = 20; |
Line 792 sub modify_quota {
|
Line 802 sub modify_quota {
|
if ($newquota =~ /^\s*(\d+\.?\d*|\.\d+)\s*$/) { |
if ($newquota =~ /^\s*(\d+\.?\d*|\.\d+)\s*$/) { |
$newquota = $1; |
$newquota = $1; |
if ($oldsettings{'internal.coursequota'} eq $env{'form.coursequota'}) { |
if ($oldsettings{'internal.coursequota'} eq $env{'form.coursequota'}) { |
$r->print(&mt('The disk space allocated for group portfolio files remains unchanged as ').$env{'form.coursequota'}.' Mb'); |
$r->print(&mt('The disk space allocated for group portfolio remains unchanged as ').$env{'form.coursequota'}.' Mb'); |
} else { |
} else { |
my %cenv = ( |
my %cenv = ( |
'internal.coursequota' => $env{'form.coursequota'}, |
'internal.coursequota' => $env{'form.coursequota'}, |
Line 801 sub modify_quota {
|
Line 811 sub modify_quota {
|
$cnum); |
$cnum); |
if (($oldsettings{'internal.coursequota'} eq '') && |
if (($oldsettings{'internal.coursequota'} eq '') && |
($env{'form.coursequota'} == $defaultquota)) { |
($env{'form.coursequota'} == $defaultquota)) { |
$r->print(&mt('The disk space allocated for group portfolio files in this course is the default quota for this domain:').' '.$defaultquota.' Mb'); |
$r->print(&mt('The disk space allocated for group portfolio in this course is the default quota for this domain:').' '.$defaultquota.' Mb'); |
} else { |
} else { |
if ($putreply eq 'ok') { |
if ($putreply eq 'ok') { |
my %updatedsettings = &Apache::lonnet::get('environment',['internal.coursequota'],$cdom,$cnum); |
my %updatedsettings = &Apache::lonnet::get('environment',['internal.coursequota'],$cdom,$cnum); |
$r->print(&mt('The disk space allocated for group portfolio files is now:').' '.$updatedsettings{'internal.coursequota'}.' Mb.'); |
$r->print(&mt('The disk space allocated for group portfolio is now:').' '.$updatedsettings{'internal.coursequota'}.' Mb.'); |
my $usage = &Apache::longroup::sum_quotas($cdom.'_'.$cnum); |
my $usage = &Apache::longroup::sum_quotas($cdom.'_'.$cnum); |
if ($usage >= $updatedsettings{'internal.coursequota'}) { |
if ($usage >= $updatedsettings{'internal.coursequota'}) { |
my $newoverquota; |
my $newoverquota; |