version 1.81, 2016/04/04 01:09:48
|
version 1.83, 2016/04/06 17:41:52
|
Line 41 use LONCAPA qw(:DEFAULT :match);
|
Line 41 use LONCAPA qw(:DEFAULT :match);
|
|
|
sub get_dc_settable { |
sub get_dc_settable { |
my ($type,$cdom) = @_; |
my ($type,$cdom) = @_; |
if (($type eq 'Community') || ($type eq 'Placement')) { |
if ($type eq 'Community') { |
return ('courseowner','selfenrollmgrdc','selfenrollmgrcc'); |
return ('courseowner','selfenrollmgrdc','selfenrollmgrcc'); |
} else { |
} else { |
my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc'); |
my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc'); |
Line 268 sub print_modification_menu {
|
Line 268 sub print_modification_menu {
|
$categorytitle = 'View/Modify Course Settings'; |
$categorytitle = 'View/Modify Course Settings'; |
$setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.'); |
$setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.'); |
$setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.'); |
$setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.'); |
if ($type eq 'Placement') { |
if (($type ne 'Placement') && (&showcredits($dom))) { |
$setparams_text = 'View/Modify course owner and self-enrollment'; |
|
} elsif (&showcredits($dom)) { |
|
$setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, and self-enrollment'; |
$setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, and self-enrollment'; |
} else { |
} else { |
$setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment'; |
$setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment'; |
Line 375 sub print_modification_menu {
|
Line 373 sub print_modification_menu {
|
if ($type eq 'Community') { |
if ($type eq 'Community') { |
$menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>'."\n". |
$menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>'."\n". |
'<li>'.&mt('Override defaults for who configures self-enrollment for this specific community').'</li>'."\n"; |
'<li>'.&mt('Override defaults for who configures self-enrollment for this specific community').'</li>'."\n"; |
} elsif ($type eq 'Placement') { |
|
$menu_html .= '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n". |
|
'<li>'.&mt('Override defaults for who configures self-enrollment for this specific course.').'</li>'."\n"; |
|
|
|
} else { |
} else { |
$menu_html .= '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n". |
$menu_html .= '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n". |
'<li>'.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").'</li>'."\n"; |
'<li>'.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").'</li>'."\n"; |
Line 853 sub print_course_modification_page {
|
Line 847 sub print_course_modification_page {
|
$r->print(&Apache::lonhtmlcommon::row_title( |
$r->print(&Apache::lonhtmlcommon::row_title( |
&Apache::loncommon::help_open_topic('Modify_Community_Owner'). |
&Apache::loncommon::help_open_topic('Modify_Community_Owner'). |
' '.&mt('Community Owner'))."\n"); |
' '.&mt('Community Owner'))."\n"); |
} elsif ($crstype eq 'Placement') { |
|
$r->print(&Apache::lonhtmlcommon::row_title( |
|
&Apache::loncommon::help_open_topic('Modify_Course_Owner'). |
|
' '.&mt('Course Owner'))."\n"); |
|
} else { |
} else { |
$r->print(&Apache::lonhtmlcommon::row_title( |
$r->print(&Apache::lonhtmlcommon::row_title( |
&Apache::loncommon::help_open_topic('Modify_Course_Instcode'). |
&Apache::loncommon::help_open_topic('Modify_Course_Instcode'). |
' '.&mt('Course Code'))."\n". |
' '.&mt('Course Code'))."\n". |
'<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'" />'. |
'<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'" />'. |
&Apache::lonhtmlcommon::row_closure()); |
&Apache::lonhtmlcommon::row_closure()); |
if (&showcredits($cdom)) { |
if (($crstype eq 'Course') && (&showcredits($cdom))) { |
$r->print(&Apache::lonhtmlcommon::row_title( |
$r->print(&Apache::lonhtmlcommon::row_title( |
&Apache::loncommon::help_open_topic('Modify_Course_Credithours'). |
&Apache::loncommon::help_open_topic('Modify_Course_Credithours'). |
' '.&mt('Credits (students)'))."\n". |
' '.&mt('Credits (students)'))."\n". |
'<input type="text" size="3" name="defaultcredits" value="'.$enrollvar{'defaultcredits'}.'" />'. |
'<input type="text" size="3" name="defaultcredits" value="'.$enrollvar{'defaultcredits'}.'" />'. |
&Apache::lonhtmlcommon::row_closure()); |
&Apache::lonhtmlcommon::row_closure()); |
} |
} |
$r->print(&Apache::lonhtmlcommon::row_title( |
$r->print(&Apache::lonhtmlcommon::row_title( |
&Apache::loncommon::help_open_topic('Modify_Course_Defaultauth'). |
&Apache::loncommon::help_open_topic('Modify_Course_Defaultauth'). |
' '.&mt('Default Authentication method'))."\n". |
' '.&mt('Default Authentication method'))."\n". |
$authenitems."\n". |
$authenitems."\n". |
&Apache::lonhtmlcommon::row_closure(). |
&Apache::lonhtmlcommon::row_closure(). |
&Apache::lonhtmlcommon::row_title( |
&Apache::lonhtmlcommon::row_title( |
&Apache::loncommon::help_open_topic('Modify_Course_Owner'). |
&Apache::loncommon::help_open_topic('Modify_Course_Owner'). |
' '.&mt('Course Owner'))."\n"); |
' '.&mt('Course Owner'))."\n"); |
} |
} |
my ($cctitle,$rolename,$currmanages,$ccchecked,$dcchecked,$defaultchecked); |
my ($cctitle,$rolename,$currmanages,$ccchecked,$dcchecked,$defaultchecked); |
my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles(); |
my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles(); |
Line 931 sub print_course_modification_page {
|
Line 921 sub print_course_modification_page {
|
'<br />'.&Apache::lonhtmlcommon::row_closure(1). |
'<br />'.&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::end_pick_box().'</p><p>'.$hidden_elements. |
&Apache::lonhtmlcommon::end_pick_box().'</p><p>'.$hidden_elements. |
'<input type="button" onclick="javascript:changePage(this.form,'."'processparms'".');'); |
'<input type="button" onclick="javascript:changePage(this.form,'."'processparms'".');'); |
if (($crstype eq 'Community') || ($crstype eq 'Placement')) { |
if ($crstype eq 'Community') { |
$r->print('this.form.submit();"'); |
$r->print('this.form.submit();"'); |
} else { |
} else { |
$r->print('javascript:verify_message(this.form);"'); |
$r->print('javascript:verify_message(this.form);"'); |
Line 1070 sub modify_course {
|
Line 1060 sub modify_course {
|
if ($type eq 'Community') { |
if ($type eq 'Community') { |
%changed = ( owner => 0 ); |
%changed = ( owner => 0 ); |
$ccrole = 'co'; |
$ccrole = 'co'; |
} elsif ($type eq 'Placement') { |
|
%changed = ( owner => 0 ); |
|
$ccrole = 'cc'; |
|
} else { |
} else { |
%changed = ( code => 0, |
%changed = ( code => 0, |
owner => 0, |
owner => 0, |
Line 1125 sub modify_course {
|
Line 1112 sub modify_course {
|
} |
} |
} |
} |
|
|
if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) { |
if (($type ne 'Placement') && (&showcredits($cdom) && exists($env{'form.defaultcredits'}))) { |
$newattr{'defaultcredits'} =~ s/[^\d\.]//g; |
$newattr{'defaultcredits'} =~ s/[^\d\.]//g; |
$newattr{'defaultcredits'}=$env{'form.defaultcredits'}; |
$newattr{'defaultcredits'}=$env{'form.defaultcredits'}; |
} |
} |
Line 2205 sub handler {
|
Line 2192 sub handler {
|
} |
} |
my $choose_text; |
my $choose_text; |
my $type = $env{'form.type'}; |
my $type = $env{'form.type'}; |
print STDERR "type is ||$type||\n"; |
|
if ($type eq '') { |
if ($type eq '') { |
$type = 'Course'; |
$type = 'Course'; |
} |
} |