[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Mon Apr 8 19:57:21 EDT 2013
raeburn Mon Apr 8 23:57:21 2013 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
- "Classlists and staff listing" screen includes course-specific default
credits (if set by DC via "View or modify a course or community", or
when course created etc.).
- Enlarge textboxes for course description and url.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.54 loncom/interface/courseprefs.pm:1.55
--- loncom/interface/courseprefs.pm:1.54 Tue Jan 8 15:12:41 2013
+++ loncom/interface/courseprefs.pm Mon Apr 8 23:57:21 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.54 2013/01/08 15:12:41 bisitz Exp $
+# $Id: courseprefs.pm,v 1.55 2013/04/08 23:57:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -300,6 +300,7 @@
gens => 'General course settings',
idnu => 'Course ID or number',
desc => 'Course Description',
+ cred => 'Student credits',
ownr => 'Course Owner',
cown => 'Course Co-owners',
catg => 'Categorize course',
@@ -422,6 +423,7 @@
col2 => $lt{'stuv'}}],
ordered => ['default_enrollment_start_date',
'default_enrollment_end_date',
+ 'defaultcredits',
'nothideprivileged','student_classlist_view',
'student_classlist_opt_in','student_classlist_portfiles'],
itemtext => {
@@ -431,6 +433,7 @@
student_classlist_view => $lt{'stuv'},
student_classlist_opt_in => $lt{'stul'},
student_classlist_portfiles => 'Include link to accessible portfolio files',
+ defaultcredits => $lt{'cred'},
},
},
'appearance' =>
@@ -683,6 +686,11 @@
($entry eq 'owner'));
push(@ordered,$entry);
}
+ } elsif ($action eq 'classlists') {
+ foreach my $entry (@{$item->{'ordered'}}) {
+ next if ($entry eq 'defaultcredits');
+ push(@ordered,$entry);
+ }
} else {
@ordered = @{$item->{'ordered'}};
}
@@ -1781,13 +1789,13 @@
&mt('Modification may make assessment data inaccessible!').
'</span>',
input => 'textbox',
- size => '40',
+ size => '55',
advanced => 1
},
'description' => {
text => '<b>'.&mt($itemtext->{'description'}).'</b>',
input => 'textbox',
- size => '25',
+ size => '55',
},
'owner' => {
text => '<b>'.&mt($itemtext->{'owner'}).'</b>',
@@ -1834,6 +1842,9 @@
'loncaparev' => {
text => '<b>'.&mt($itemtext->{'loncaparev'}).'</b>',
},
+ 'defaultcredits' => {
+ text => '<b>'.&mt($itemtext->{'defaultcredits'}).'</b>',
+ },
);
my $datatable;
my $count = 0;
@@ -3288,6 +3299,9 @@
if ($position eq 'top') {
@ordered = ('default_enrollment_start_date',
'default_enrollment_end_date');
+ if ($crstype eq 'Course') {
+ push(@ordered,'defaultcredits');
+ }
} elsif ($position eq 'middle') {
@ordered = ('nothideprivileged');
} else {
@@ -3320,7 +3334,10 @@
text => '<b>'.&mt($itemtext->{'default_enrollment_end_date'}).'</b>',
input => 'dates',
},
-
+ 'defaultcredits' => {
+ text => '<b>'.&mt($itemtext->{'defaultcredits'}).'</b>',
+ },
+
'nothideprivileged' => {
text => '<b>'.&mt($itemtext->{'nothideprivileged'}).'</b>',
input => 'checkbox',
@@ -3722,7 +3739,16 @@
} else {
$datatable .= &item_table_row_start($items->{$item}{text},$count);
}
- if ($item eq 'nothideprivileged') {
+ if ($item eq 'defaultcredits') {
+ my $defaultcredits = $env{'course.'.$env{'request.course.id'}.'.internal.defaultcredits'};
+ my $showcredits;
+ if ($defaultcredits ne '') {
+ $showcredits = &mt('Default is [quant,_1,credit]',$defaultcredits);
+ } else {
+ $showcredits = &mt('No default set');
+ }
+ $datatable .= $showcredits;
+ } elsif ($item eq 'nothideprivileged') {
$datatable .= ¬hidepriv_row($cdom,$item,$settings,$crstype);
} elsif ($item eq 'print_header_format') {
$datatable .= &print_hdrfmt_row($item,$settings);
More information about the LON-CAPA-cvs
mailing list