[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncommon.pm
raeburn
raeburn@source.lon-capa.org
Fri, 26 Feb 2010 22:48:44 -0000
raeburn Fri Feb 26 22:48:44 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface loncommon.pm
Log:
- Customization for GCI_3
- When creating a course, call &Apache::lonclonecourse::copyroster(),
if cloneroster included in courseargs.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.11 loncom/interface/loncommon.pm:1.925.2.12
--- loncom/interface/loncommon.pm:1.925.2.11 Thu Feb 25 16:01:15 2010
+++ loncom/interface/loncommon.pm Fri Feb 26 22:48:43 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.925.2.11 2010/02/25 16:01:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.12 2010/02/26 22:48:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -10431,6 +10431,21 @@
$outcome .= ($fatal?$errtext:'write ok').$linefeed;
}
+ if ($args->{'cloneroster'}) {
+ my ($numadded,$clisterror) = &Apache::lonclonecourse::copyroster($cloneid,$$courseid,$args->{'startaccess'},$args->{'endaccess'});
+ if ($clisterror) {
+ $outcome .= "\0".&mt('An error occurred when copying the student roster from the old course to the new course; the error was: [_1].',$clisterror).$linefeed;
+ if ($numadded) {
+ $outcome .= &mt('Although [quant,_1,student] have received roles in the new course the roster does not report this. It is ').$linefeed;
+ }
+ } else {
+ if ($numadded) {
+ $outcome .= "\0".&mt('[quant,_1,student] copied from roster for old course to roster for new course.',$numadded).$linefeed;
+ } else {
+ $outcome .= "\0".&mt('No students have been enrolled in the new Concept Test.').' '.&mt('This is because either (a) an error occurred, or (b) there were no students with either current access or access which ended on/after the current default end date set for access to the old course.').$linefeed;
+ }
+ }
+ }
return (1,$outcome);
}