--- loncom/interface/courseprefs.pm 2010/11/19 12:44:40 1.32
+++ loncom/interface/courseprefs.pm 2010/12/21 00:26:56 1.35
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.32 2010/11/19 12:44:40 raeburn Exp $
+# $Id: courseprefs.pm,v 1.35 2010/12/21 00:26:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -320,6 +320,7 @@ sub handler {
seme => 'Send message to student when clicking Done on Tasks',
);
}
+ $lt{'lcrv'} = 'Required LON-CAPA version';
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/courseprefs',
text=>$lt{'conf'}});
my $breadcrumbs =
@@ -344,9 +345,9 @@ sub handler {
'courseinfo' =>
{ text => $lt{'gens'},
help => 'Course_Environment',
- ordered => ['owner','co-owners','description','courseid',
- 'categories','hidefromcat','externalsyllabus',
- 'cloners','url','rolenames'],
+ ordered => ['owner','co-owners','loncaparev','description',
+ 'courseid','categories','hidefromcat',
+ 'externalsyllabus','cloners','url','rolenames'],
itemtext => {
'owner' => $lt{'ownr'},
'co-owners' => $lt{'cown'},
@@ -358,6 +359,7 @@ sub handler {
'externalsyllabus' => 'URL of Syllabus',
'url' => 'Top Level Map',
'rolenames' => $lt{'rept'},
+ 'loncaparev' => $lt{'lcrv'},
},
},
'localization' =>
@@ -679,6 +681,7 @@ sub process_changes {
}
} else {
foreach my $entry (@ordered) {
+ next if (($entry eq 'loncaparev') || ($entry eq 'owner'));
if ($entry eq 'cloners') {
if ($env{'form.cloners_all'}) {
$newvalues{$entry} = '*';
@@ -687,8 +690,8 @@ sub process_changes {
if (exists($env{'form.cloners_activate'})) {
my $actnum = $env{'form.cloners_activate'};
if ($actnum ne '') {
- if ($env{'form.clonersdom_'.$actnum} ne '') {
- my $clonedom = $env{'form.clonersdom_'.$actnum};
+ if ($env{'form.cloners_dom_'.$actnum} ne '') {
+ my $clonedom = $env{'form.cloners_dom_'.$actnum};
if (&check_clone($clonedom,$disallowed) eq 'ok') {
$newvalues{$entry} = '*:'.$clonedom;
push(@clonedoms,$newvalues{$entry});
@@ -1709,6 +1712,9 @@ sub print_courseinfo {
input => 'textbox',
size => '25',
},
+ 'loncaparev' => {
+ text => ''.&mt($itemtext->{'loncaparev'}).'',
+ },
);
my $datatable;
my $count = 0;
@@ -1846,7 +1852,6 @@ sub print_courseinfo {
} else {
$owner = &mt('None specified');
}
- my $domdesc = &Apache::lonnet::domain($cdom,'description');
$datatable .= $owner;
} elsif ($item eq 'co-owners') {
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -1868,6 +1873,16 @@ sub print_courseinfo {
$datatable .= &manage_coownership($cnum,$cdom,@currcoown);
}
}
+ } elsif ($item eq 'loncaparev') {
+ my $loncaparev = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'};
+ my $showreqd;
+ if ($loncaparev) {
+ $showreqd = &mt('[_1] or newer',$loncaparev);
+ } else {
+ $showreqd = &mt('No specific version required');
+ }
+ $datatable .= $showreqd;
+
} else {
$datatable .= &Apache::lonhtmlcommon::textbox($item,$settings->{$item},$items{$item}{size});
}
@@ -2742,11 +2757,12 @@ sub print_grading {
input => 'selectbox',
options => {
standard => &mt('Standard: shows points'),
+ categories => &mt('Categories: shows points according to categories'),
external => &mt('External: shows number of completed parts and totals'),
externalnototals => &mt('External: shows only number of completed parts'),
spreadsheet => &mt('Spreadsheet: (with link to detailed scores)'),
},
- order => ['standard','external','externalnototals','spreadsheet'],
+ order => ['standard','categories','external','externalnototals','spreadsheet'],
},
'rndseed' => {
text => ''.&mt($itemtext->{'rndseed'}).''.