version 1.41.2.5, 2010/02/25 05:01:25
|
version 1.41.2.6, 2010/02/26 22:38:31
|
Line 285 sub handler {
|
Line 285 sub handler {
|
$jscript = &mainmenu_javascript(); |
$jscript = &mainmenu_javascript(); |
} else { |
} else { |
$jscript = &Apache::lonhtmlcommon::set_form_elements($elementsref,\%stored); |
$jscript = &Apache::lonhtmlcommon::set_form_elements($elementsref,\%stored); |
|
if ($state eq 'courseinfo') { |
|
$jscript .= &cloning_javascript(); |
|
} |
} |
} |
} |
} |
|
|
Line 292 sub handler {
|
Line 295 sub handler {
|
$jscript .= "\n".&Apache::loncommon::userbrowser_javascript(); |
$jscript .= "\n".&Apache::loncommon::userbrowser_javascript(); |
} |
} |
|
|
my $loaditems = &onload_action($action,$state); |
my $loaditems = &onload_action($action,$state,$dom); |
|
|
my (%can_request,%request_domains); |
my (%can_request,%request_domains); |
my $canreq = |
my $canreq = |
Line 364 function setAction(courseForm) {
|
Line 367 function setAction(courseForm) {
|
END |
END |
} |
} |
|
|
|
sub cloning_javascript { |
|
return <<"END"; |
|
function setCloneDisplay(courseForm) { |
|
if (courseForm.cloning.length > 1) { |
|
for (var i=0; i<courseForm.cloning.length; i++) { |
|
if (courseForm.cloning[i].checked) { |
|
if (courseForm.cloning[i].value == 1) { |
|
document.getElementById('cloneoptions').style.display="block";; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
END |
|
} |
|
|
sub get_breadcrumbs { |
sub get_breadcrumbs { |
my ($dom,$action,$state,$states,$trail) = @_; |
my ($dom,$action,$state,$states,$trail) = @_; |
my ($crumb,$newinstcode,$codechk,$checkedcode,$numtitles,$description); |
my ($crumb,$newinstcode,$codechk,$checkedcode,$numtitles,$description); |
Line 480 sub form_elements {
|
Line 499 sub form_elements {
|
}, |
}, |
courseinfo => { |
courseinfo => { |
cdescr => 'text', |
cdescr => 'text', |
|
cloning => 'radio', |
clonecrs => 'text', |
clonecrs => 'text', |
clonedom => 'selectbox', |
clonedom => 'selectbox', |
datemode => 'radio', |
datemode => 'radio', |
Line 518 sub form_elements {
|
Line 538 sub form_elements {
|
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
%{$elements{'new'}{'courseinfo'}} = ( |
%{$elements{'new'}{'courseinfo'}} = ( |
cdescr => 'text', |
cdescr => 'text', |
concepttest => 'radio', |
concepttest => 'radio', |
); |
); |
|
if (&show_cloneable()) { |
|
$elements{'new'}{'courseinfo'}{'clonecrs'} = 'selectbox'; |
|
$elements{'new'}{'courseinfo'}{'clonedom'} = 'hidden'; |
|
$elements{'new'}{'courseinfo'}{'cloneroster'} = 'checkbox'; |
|
} |
} |
} |
my $numlib = keys(%servers); |
my $numlib = keys(%servers); |
if ($numlib > 1) { |
if ($numlib > 1) { |
Line 625 sub onload_action {
|
Line 650 sub onload_action {
|
if ($state eq 'crstype') { |
if ($state eq 'crstype') { |
$loaditems{'onload'} = 'javascript:setAction(document.mainmenu_action);javascript:setType(document.mainmenu_coursetype)'; |
$loaditems{'onload'} = 'javascript:setAction(document.mainmenu_action);javascript:setType(document.mainmenu_coursetype)'; |
} else { |
} else { |
$loaditems{'onload'} = 'javascript:setFormElements(document.requestcrs)'; |
$loaditems{'onload'} = 'javascript:setFormElements(document.requestcrs);'; |
|
} |
|
if ($state eq 'courseinfo') { |
|
if (&show_cloneable()) { |
|
$loaditems{'onload'} .= 'javascript:setCloneDisplay(document.requestcrs);'; |
|
} |
} |
} |
if (($state eq 'process') && ($env{'form.concepttest'} eq 'editmyown')) { |
if (($state eq 'process') && ($env{'form.concepttest'} eq 'editmyown')) { |
$loaditems{'onload'} = 'javascript:setInitialVisibility()'; |
$loaditems{'onload'} = 'javascript:setInitialVisibility()'; |
Line 755 END
|
Line 785 END
|
'<li>'.&mt('Creation of a course "container" and setting of access dates').'</li>'. |
'<li>'.&mt('Creation of a course "container" and setting of access dates').'</li>'. |
'<li>'.&mt('Assembly of a valid test from Concept Inventory questions').'</li>'. |
'<li>'.&mt('Assembly of a valid test from Concept Inventory questions').'</li>'. |
'<li>'.&mt('Enrollment of students').'</li>'. |
'<li>'.&mt('Enrollment of students').'</li>'. |
'</ol></p><p>'.&mt('When assembling a test you may either:'). |
'</ol></p><p>'.&mt('When assembling a test you may:'). |
'<br />'.&mt('(a) have a valid test built automatically by the WebCenter, or').'<br />'.&mt('(b) select the questions to include by combining questions chosen from eleven bins with four mandatory questions.').'</p><p>'.&mt('The most efficient way to enroll students is to upload a text file containing usernames and passwords.').'<br />'.&mt("Students' full e-mail addresses should be used as their usernames to ensure uniqueness.").'</p><div>'. |
'<br />'.&mt('(a) have a valid test built automatically by the WebCenter, or').'<br />'.&mt('(b) select the questions to include by combining questions chosen from eleven bins with four mandatory questions, or'). |
|
'<br />'.&mt('(c) copy one of your existing tests (including optional copying of the student roster)').'</p><p>'.&mt('The most efficient way to enroll students is to upload a text file containing usernames and passwords.').'<br />'.&mt("Students' full e-mail addresses should be used as their usernames to ensure uniqueness.").'</p><div>'. |
'<form name="'.$formname.'" method="post" action="/adm/requestcourse">'."\n". |
'<form name="'.$formname.'" method="post" action="/adm/requestcourse">'."\n". |
'<input type="hidden" name="state" value="courseinfo" />'."\n". |
'<input type="hidden" name="state" value="courseinfo" />'."\n". |
'<input type="hidden" name="showdom" value="'.$dom.'" />'."\n". |
'<input type="hidden" name="showdom" value="'.$dom.'" />'."\n". |
Line 2250 sub print_review {
|
Line 2281 sub print_review {
|
$concepttest = 'Auto-generated'; |
$concepttest = 'Auto-generated'; |
} elsif ($env{'form.concepttest'} eq 'editmyown') { |
} elsif ($env{'form.concepttest'} eq 'editmyown') { |
$concepttest = 'Manually selected'; |
$concepttest = 'Manually selected'; |
|
} elsif ($env{'form.concepttest'} eq 'cloning') { |
|
$concepttest = 'Copied from existing test'; |
} |
} |
$inst_values .= '<td>'.$concepttest.'</td>'; |
$inst_values .= '<td>'.$concepttest.(' 'x2).'</td>'; |
} else { |
} |
$inst_headers .= '<th>'.&mt('Clone From').'</th>'; |
if (&show_cloneable()) { |
if (($env{'form.clonecrs'} =~ /^$match_name$/) && |
$inst_headers .= '<th>'.&mt('Copy From').'</th>'; |
|
if ((($env{'form.cloning'}) || |
|
(($dom eq 'gcitest') && ($env{'form.concepttest'} eq 'cloning'))) && |
|
($env{'form.clonecrs'} =~ /^$match_name$/) && |
($env{'form.clonedom'} =~ /^$match_domain$/)) { |
($env{'form.clonedom'} =~ /^$match_domain$/)) { |
my $canclone = &Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
my $canclone = &Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
Line 2263 sub print_review {
|
Line 2299 sub print_review {
|
my %courseenv = &Apache::lonnet::userenvironment($env{'form.clonedom'}, |
my %courseenv = &Apache::lonnet::userenvironment($env{'form.clonedom'}, |
$env{'form.clonecrs'},('description','internal.coursecode')); |
$env{'form.clonecrs'},('description','internal.coursecode')); |
if (keys(%courseenv) > 0) { |
if (keys(%courseenv) > 0) { |
$inst_headers .= '<th>'.$ctxt{'dsh'}.'</th>'; |
if ($dom eq 'gcitest') { |
|
$inst_headers .= '<th>'.$ctxt{'ros'}.'</th>'; |
|
} else { |
|
$inst_headers .= '<th>'.$ctxt{'dsh'}.'</th>'; |
|
} |
$inst_values .= '<td>'.$courseenv{'description'}.' '; |
$inst_values .= '<td>'.$courseenv{'description'}.' '; |
my $cloneinst = $courseenv{'internal.coursecode'}; |
my $cloneinst = $courseenv{'internal.coursecode'}; |
if ($cloneinst ne '') { |
if ($cloneinst ne '') { |
$inst_values .= $cloneinst.' '.&mt('in').' '.$env{'form.clonedom'}; |
$inst_values .= $cloneinst.' '.&mt('in').' '.$env{'form.clonedom'}; |
} else { |
} else { |
$inst_values .= &mt('from').' '.$env{'form.clonedom'}; |
unless ($dom eq 'gcitest') { |
|
$inst_values .= &mt('from').' '.$env{'form.clonedom'}; |
|
} |
} |
} |
$inst_values .= '</td><td>'; |
$inst_values .= (' 'x2).'</td><td>'; |
if ($env{'form.datemode'} eq 'preserve') { |
if ($dom eq 'gcitest') { |
$inst_values .= $ctxt{'prd'}; |
if ($env{'form.cloneroster'}) { |
} elsif ($env{'form.datemode'} eq 'shift') { |
$inst_values .= &mt('Yes'); |
$inst_values .= &mt('Shift dates by [_1] days',$env{'form.dateshift'}); |
} else { |
|
$inst_values .= &mt('No'); |
|
} |
} else { |
} else { |
$inst_values .= $ctxt{'ncd'}; |
if ($env{'form.datemode'} eq 'preserve') { |
|
$inst_values .= $ctxt{'prd'}; |
|
} elsif ($env{'form.datemode'} eq 'shift') { |
|
$inst_values .= &mt('Shift dates by [_1] days',$env{'form.dateshift'}); |
|
} else { |
|
$inst_values .= $ctxt{'ncd'}; |
|
} |
} |
} |
$inst_values .= '</td>'; |
$inst_values .= '</td>'; |
} else { |
} else { |
Line 2437 function validateForm() {
|
Line 2487 function validateForm() {
|
} |
} |
nextPage(document.$formname,'$next'); |
nextPage(document.$formname,'$next'); |
} |
} |
|
|
|
function toggleCloning() { |
|
var willclone; |
|
if (document.$formname.cloning.length > 1) { |
|
for (var i=0; i<document.$formname.cloning.length; i++) { |
|
if (document.$formname.cloning[i].checked) { |
|
willclone = document.$formname.cloning[i].value; |
|
} |
|
} |
|
} |
|
if (willclone == 1) { |
|
document.getElementById('cloneoptions').style.display="block"; |
|
} else { |
|
document.getElementById('cloneoptions').style.display="none"; |
|
document.$formname.clonecrs.value = ''; |
|
} |
|
} |
|
|
// ]] |
// ]] |
</script> |
</script> |
|
|
Line 2447 ENDJS
|
Line 2515 ENDJS
|
$title = &mt('Concept Test Course Information'); |
$title = &mt('Concept Test Course Information'); |
$desctitle = &mt('Concept Test Title'); |
$desctitle = &mt('Concept Test Title'); |
} |
} |
my $clonetitle = &mt('Clone content and settings from an existing course?'); |
my $clonetitle = &mt('Copy content and settings from an existing course?'); |
if ($crstype eq 'community') { |
if ($crstype eq 'community') { |
$title = &mt('Brief Community Description'); |
$title = &mt('Brief Community Description'); |
$clonetitle = &mt('Clone content and settings from an existing community?'); |
$clonetitle = &mt('Copy content and settings from an existing community?'); |
} |
} |
my $output .= $js_validate."\n".'<div>'.&Apache::lonhtmlcommon::start_pick_box(). |
my $output .= $js_validate."\n".&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::row_headline(). |
&Apache::lonhtmlcommon::row_headline(). |
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'</h3>'. |
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'</h3>'. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_title($desctitle). |
&Apache::lonhtmlcommon::row_title($desctitle). |
'<input type="text" size="60" name="cdescr" value="'.$description.'" />'; |
'<input type="text" size="60" name="cdescr" value="'.$description.'" />'; |
|
my $showclone; |
|
if ($dom eq 'gcitest') { |
|
$showclone = &show_cloneable(); |
|
} else { |
|
$showclone = 1; |
|
} |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
$output .= &Apache::lonhtmlcommon::row_closure(1). |
$output .= &Apache::lonhtmlcommon::row_closure(1). |
&concepttest_form(); |
&concepttest_form($showclone); |
} |
} |
my ($home_server_pick,$numlib) = |
my ($home_server_pick,$numlib) = |
&Apache::loncommon::home_server_form_item($dom,'chome', |
&Apache::loncommon::home_server_form_item($dom,'chome', |
Line 2471 ENDJS
|
Line 2545 ENDJS
|
} |
} |
$output .= $home_server_pick. |
$output .= $home_server_pick. |
&Apache::lonhtmlcommon::row_closure(); |
&Apache::lonhtmlcommon::row_closure(); |
|
if ($showclone && $dom ne 'gcitest') { |
|
$output .= &Apache::lonhtmlcommon::row_headline(). |
|
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Clone').' '.$clonetitle. |
|
'<label><input type="radio" name="cloning" value="1" '. |
|
'onclick="javascript:toggleCloning()" />'. |
|
&mt('Yes').(' 'x2).'</label><label>'. |
|
'<input type="radio" name="cloning" value="0" checked="checked"'. |
|
'onclick="javascript:toggleCloning()" />'.&mt('No').'</label>'. |
|
'</h3>'. |
|
&Apache::lonhtmlcommon::row_closure(1). |
|
&Apache::lonhtmlcommon::row_headline(). |
|
'<div id="cloneoptions" style="display: none" >'. |
|
&Apache::lonhtmlcommon::start_pick_box(). |
|
&clone_form($dom,$formname,$crstype). |
|
&Apache::lonhtmlcommon::end_pick_box().'</div>'; |
|
} |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
my ($instcode,@codetitles,%cat_titles,%cat_order,@code_order); |
my ($instcode,@codetitles,%cat_titles,%cat_order,@code_order); |
my $invalidcrosslist = []; |
my $invalidcrosslist = []; |
$output .= &print_enrollment_menu($formname,$instcode,$dom, |
$output .= &print_enrollment_menu($formname,$instcode,$dom, |
\@codetitles,\%cat_titles,\%cat_order, |
\@codetitles,\%cat_titles,\%cat_order, |
\@code_order,$invalidcrosslist); |
\@code_order,$invalidcrosslist); |
} else { |
|
$output .= |
|
&Apache::lonhtmlcommon::row_headline(). |
|
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Clone').' '.$clonetitle.'</h3>'. |
|
&Apache::lonhtmlcommon::row_closure(1). |
|
&clone_form($dom,$formname,$crstype); |
|
} |
} |
$output .= &Apache::lonhtmlcommon::end_pick_box().'</div>'."\n"; |
$output .= &Apache::lonhtmlcommon::end_pick_box()."\n"; |
return $output; |
return $output; |
} |
} |
|
|
sub concepttest_form { |
sub concepttest_form { |
return &Apache::lonhtmlcommon::row_title(&mt('Questions included in Concept Test')). |
my ($showclone) = @_; |
'<input type="radio" name="concepttest" value="defchosen" /> '. |
my $output = &Apache::lonhtmlcommon::row_title(&mt('Questions included in Concept Test')). |
&mt('Automatically selected by WebCenter'). |
'<label>'. |
'</label><br /><label>'. |
'<input type="radio" name="concepttest" value="editmyown" checked="checked" /> '. |
'<input type="radio" name="concepttest" value="editmyown" checked="checked" /> '. |
&mt('Chosen by you from Concept Inventory'). |
&mt('Chosen by you from Concept Inventory'). |
'</label><br />'. |
'</label><br /><label>'; |
'<label>'. |
|
'<input type="radio" name="concepttest" value="defchosen" /> '. |
|
&mt('Automatically selected by WebCenter'). |
|
'</label>'; |
|
if ($showclone) { |
|
$output .= '<br /><span class="LC_nobreak"><label>'. |
|
'<input type="radio" name="concepttest" value="cloning" /> '. |
|
&mt('Copied from existing Test: '). |
|
'</label>'.&select_oldtest().(' ' x2). |
|
'<input type="hidden" name="clonedom" value="gcitest" />'. |
|
'<label><input type="checkbox" value="1" name="cloneroster" />'. |
|
&mt('Copy roster').'</label>'; |
|
} |
|
return $output; |
|
} |
|
|
|
sub select_oldtest { |
|
my $output = '<select name="clonecrs"><option value="" selected="selected">'. |
|
'</option>'; |
|
my %courses = &Apache::loncommon::existing_gcitest_courses('cc'); |
|
my %Sortby; |
|
foreach my $course (sort(keys(%courses))) { |
|
next unless (ref($courses{$course}) eq 'HASH'); |
|
my $clean_title = $courses{$course}{'description'}; |
|
$clean_title =~ s/\W+//g; |
|
if ($clean_title eq '') { |
|
$clean_title = $courses{$course}{'description'}; |
|
} |
|
push(@{$Sortby{$clean_title}},$course); |
|
} |
|
my @sorted_courses = sort { lc($a) cmp lc($b) } (keys(%Sortby)); |
|
foreach my $item (@sorted_courses) { |
|
foreach my $course (@{$Sortby{$item}}) { |
|
my ($cdom,$cnum) = split('_',$course); |
|
if (($cdom eq 'gcitest') && (ref($courses{$course}) eq 'HASH')) { |
|
my $cdesc = $courses{$course}{'description'}; |
|
$output .= '<option value="'.$cnum.'">'.$cdesc.'</option>'; |
|
} |
|
} |
|
} |
|
$output .= '</select>'; |
|
return $output; |
} |
} |
|
|
sub clone_form { |
sub clone_form { |
Line 2531 sub clone_text {
|
Line 2656 sub clone_text {
|
'dmn' => 'Domain', |
'dmn' => 'Domain', |
'dsh' => 'Date Shift', |
'dsh' => 'Date Shift', |
'ncd' => 'Do not clone date parameters', |
'ncd' => 'Do not clone date parameters', |
'prd' => 'Clone date parameters as-is', |
'prd' => 'Copy date parameters as-is', |
'shd' => 'Shift date parameters by number of days', |
'shd' => 'Shift date parameters by number of days', |
|
'ros' => 'Copy Roster', |
); |
); |
} |
} |
|
|
Line 2855 sub print_request_outcome {
|
Line 2981 sub print_request_outcome {
|
} |
} |
my $clonecrs = ''; |
my $clonecrs = ''; |
my $clonedom = ''; |
my $clonedom = ''; |
if (($env{'form.clonecrs'} =~ /^($match_courseid)$/) && |
if ((($env{'form.cloning'}) || |
|
(($dom eq 'gcitest') && ($env{'form.concepttest'} eq 'cloning'))) && |
|
($env{'form.clonecrs'} =~ /^($match_courseid)$/) && |
($env{'form.clonedom'} =~ /^($match_domain)$/)) { |
($env{'form.clonedom'} =~ /^($match_domain)$/)) { |
|
if ($dom eq 'gcitest') { |
|
$env{'form.clonedom'} = 'gcitest'; |
|
} |
my $clonehome = &Apache::lonnet::homeserver($env{'form.clonecrs'}, |
my $clonehome = &Apache::lonnet::homeserver($env{'form.clonecrs'}, |
$env{'form.clonedom'}); |
$env{'form.clonedom'}); |
if ($clonehome ne 'no_host') { |
if ($clonehome ne 'no_host') { |
my $canclone = |
my $canclone = |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
Line 2901 sub print_request_outcome {
|
Line 3032 sub print_request_outcome {
|
} else { |
} else { |
$details->{'firstres'} = 'blank'; |
$details->{'firstres'} = 'blank'; |
} |
} |
$details->{'clonedom'} = 'gci'; |
if ($env{'form.concepttest'} eq 'cloning') { |
$details->{'clonecrs'} = '8v226795a882b4bcagcil1'; |
if (($clonecrs) && ($clonedom eq 'gcitest')) { |
|
$details->{'cloneroster'} = $env{'form.cloneroster'}; |
|
} else { |
|
$details->{'clonedom'} = 'gci'; |
|
$details->{'clonecrs'} = '8v226795a882b4bcagcil1'; |
|
} |
|
} else { |
|
$details->{'clonedom'} = 'gci'; |
|
$details->{'clonecrs'} = '8v226795a882b4bcagcil1'; |
|
} |
$details->{'datemode'} = 'delete'; |
$details->{'datemode'} = 'delete'; |
} |
} |
my (@inststatuses,$storeresult,$creationresult); |
my (@inststatuses,$storeresult,$creationresult); |
Line 3007 sub print_request_outcome {
|
Line 3147 sub print_request_outcome {
|
suppress_tries => 'yes', |
suppress_tries => 'yes', |
); |
); |
my $putresult = &Apache::lonnet::put('environment',\%crsenvhash,$dom,$cnum); |
my $putresult = &Apache::lonnet::put('environment',\%crsenvhash,$dom,$cnum); |
if ($env{'form.concepttest'} eq 'defchosen') { |
if ($env{'form.concepttest'} eq 'cloning') { |
|
&Apache::lonuserstate::readmap($dom.'/'.$cnum); |
|
if (($clonecrs) && ($clonedom eq 'gcitest')) { |
|
my $cloneid = $clonedom.'/'.$clonecrs; |
|
my %clonedesc = &Apache::lonnet::coursedescription($cloneid,{'one_time' => 1}); |
|
my $oldcdesc = $clonedesc{'description'}; |
|
$output .= '<br />'.&mt('A concept test has been copied from your existing test: [_1].','<b>'.$oldcdesc.'</b>').'</p>'; |
|
if ($env{'form.cloneroster'}) { |
|
$output .= '<br />'.&mt('You requested copying of the old student roster to the new course.'); |
|
if ($logmsg =~ /\Q\0\E/) { |
|
my @logging = split("\0",$logmsg); |
|
if (@logging) { |
|
$output .= '<p>'.$logging[-1].'</p>'; |
|
} |
|
} |
|
$output .= '<ul>'. |
|
'<li>'.&mt('Access starts:').' '. |
|
&Apache::lonlocal::locallocaltime($accessstart).'</li>'. |
|
'<li>'.&mt('Access ends:').' '.&Apache::lonlocal::locallocaltime($accessend).'</li>'. |
|
'</ul><br />'. |
|
'<a href="/adm/menu">'.&mt('Manage Test').'</a>'; |
|
$r->print($output); |
|
$output = ''; |
|
} else { |
|
&roster_upload_form($r,$output); |
|
$output = ''; |
|
} |
|
} else { |
|
$output .= '</p>'; |
|
&roster_upload_form($r,$output); |
|
$output = ''; |
|
} |
|
} elsif ($env{'form.concepttest'} eq 'defchosen') { |
$output .= '<br />'; |
$output .= '<br />'; |
my $error = &Apache::londocsgci::store($caller,$dom,$cnum); |
my $error = &Apache::londocsgci::store($caller,$dom,$cnum); |
if ($error) { |
if ($error) { |
Line 3018 sub print_request_outcome {
|
Line 3190 sub print_request_outcome {
|
&Apache::lonuserstate::readmap($dom.'/'.$cnum); |
&Apache::lonuserstate::readmap($dom.'/'.$cnum); |
$output .= &mt('A concept test has also been generated.'); |
$output .= &mt('A concept test has also been generated.'); |
} |
} |
$output .= '</p>'. |
$output .= '</p>'; |
'<p>'.&mt('If you have a text file available containing student e-mail addresses and initial passwords, you may upload it now.').'<br />'. |
&roster_upload_form($r,$output); |
&mt('You may also enroll students at a later date by visiting the [_1]"Menu"[_2] page and choosing: [_1]"Manage Enrollment"[_2].','<i>','</i>').'</p>'. |
|
'</form><form name="studentform" method="post" enctype="multipart/form-data" '. |
|
' action="/adm/createuser">'."\n"; |
|
$r->print($output); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,'course'); |
|
$r->print('</form>'); |
|
$output = ''; |
$output = ''; |
} else { |
} else { |
$output .= '</form><br />'.&mt('The next step is to chose which questions are to be included in the Concept Test.').'</p>'; |
$output .= '</p></form><br />'.&mt('The next step is to chose which questions are to be included in the Concept Test.').'</p>'; |
$r->print($output); |
$r->print($output); |
&Apache::londocsgci::editor($r,'requestcrs',$dom,$cnum); |
&Apache::londocsgci::editor($r,'requestcrs',$dom,$cnum); |
$output = ''; |
$output = ''; |
Line 3348 sub store_crsparms {
|
Line 3514 sub store_crsparms {
|
return %parmresult; |
return %parmresult; |
} |
} |
|
|
|
sub roster_upload_form { |
|
my ($r,$output) = @_; |
|
$r->print('<p>'.&mt('If you have a text file available containing student e-mail addresses and initial passwords, you may upload it now.').'<br />'. |
|
&mt('You may also enroll students at a later date by visiting the [_1]"Menu"[_2] page and choosing: [_1]"Manage Enrollment"[_2].','<i>','</i>').'</p>'. |
|
'</form><form name="studentform" method="post" enctype="multipart/form-data" '. |
|
' action="/adm/createuser">'."\n"); |
|
&Apache::lonuserutils::print_first_users_upload_form($r,'course'); |
|
$r->print('</form>'); |
|
} |
|
|
sub notification_information { |
sub notification_information { |
my ($disposition,$req_notifylist,$cnum,$now) = @_; |
my ($disposition,$req_notifylist,$cnum,$now) = @_; |
my %emails = &Apache::loncommon::getemails(); |
my %emails = &Apache::loncommon::getemails(); |
Line 3675 sub generate_date_items {
|
Line 3851 sub generate_date_items {
|
return; |
return; |
} |
} |
|
|
|
sub show_cloneable { |
|
my $showclone; |
|
if (&Apache::loncommon::needs_gci_custom()) { |
|
my %courses = &Apache::loncommon::existing_gcitest_courses('cc'); |
|
my $numcourses = scalar(keys(%courses)); |
|
return $numcourses; |
|
} else { |
|
return 1; |
|
} |
|
} |
|
|
1; |
1; |
|
|