--- loncom/interface/loncommon.pm 2010/02/25 16:01:15 1.925.2.11 +++ loncom/interface/loncommon.pm 2010/02/26 22:48:43 1.925.2.12 @@ -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 @@ sub construct_course { $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); }