version 1.99, 2004/01/15 19:27:05
|
version 1.102, 2004/02/20 19:44:59
|
Line 42 use Apache::lonlocal;
|
Line 42 use Apache::lonlocal;
|
############################################################### |
############################################################### |
############################################################### |
############################################################### |
sub header { |
sub header { |
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'). |
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); |
&Apache::loncommon::help_open_faq(9). |
|
&Apache::loncommon::help_open_bug('Instructor Interface'); |
|
my $title = &mt('LON-CAPA Enrollment Manager'); |
my $title = &mt('LON-CAPA Enrollment Manager'); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
<html> |
Line 1111 sub print_html_classlist {
|
Line 1109 sub print_html_classlist {
|
} |
} |
my $status_select = &Apache::lonhtmlcommon::StatusOptions |
my $status_select = &Apache::lonhtmlcommon::StatusOptions |
($ENV{'form.Status'},'studentform'); |
($ENV{'form.Status'},'studentform'); |
|
my $cid=$ENV{'request.course.id'}; |
|
my $cdom=$ENV{'course.'.$cid.'.domain'}; |
|
my $cnum=$ENV{'course.'.$cid.'.num'}; |
|
# -------------------------------------------------------- Get course personnel |
|
my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum); |
|
$r->print('<table border="2">'); |
|
foreach (sort keys %coursepersonnel) { |
|
$r->print('<tr><td>'.$_.'</td><td>'); |
|
foreach (split(/\,/,$coursepersonnel{$_})) { |
|
my ($puname,$pudom)=split(/\:/,$_); |
|
$r->print(' '.&Apache::loncommon::aboutmewrapper( |
|
&Apache::loncommon::plainname($puname, |
|
$pudom),$puname,$pudom)); |
|
} |
|
$r->print('</td></tr>'); |
|
} |
|
$r->print('</table>'); |
|
# --------------------------------------------------------------- Student roles |
my $CCL=&mt('Current Class List'); |
my $CCL=&mt('Current Class List'); |
$r->print(<<END); |
$r->print(<<END); |
<input type="hidden" name="action" value="$ENV{'form.action'}" /> |
<input type="hidden" name="action" value="$ENV{'form.action'}" /> |
Line 1135 $lt{'ss'}:
|
Line 1151 $lt{'ss'}:
|
END |
END |
} |
} |
$r->print($status_select."</p>\n"); |
$r->print($status_select."</p>\n"); |
my $cid=$ENV{'request.course.id'}; |
|
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist(); |
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist(); |
if (! defined($classlist)) { |
if (! defined($classlist)) { |
$r->print(&mt('There are no students currently enrolled.')."\n"); |
$r->print(&mt('There are no students currently enrolled.')."\n"); |
Line 1348 sub print_modify_student_form {
|
Line 1363 sub print_modify_student_form {
|
$r->print('<p>'.$starttime.'</p>'); |
$r->print('<p>'.$starttime.'</p>'); |
return; |
return; |
} |
} |
|
# |
# Deal with date forms |
# Deal with date forms |
|
my $current_date_description = ''; |
|
my $textdate = ''; |
|
|
|
if (! defined($starttime) || $starttime == 0) { |
|
$current_date_description = &mt('Current Starting Date: not set'). |
|
'<br />'; |
|
} else { |
|
$current_date_description = |
|
&mt('Current Starting Date: [_1]', |
|
&Apache::lonlocal::locallocaltime($starttime)).'<br />'; |
|
} |
|
if (! defined($endtime) || $endtime == 0) { |
|
$current_date_description.= &mt('Current Ending Date: not set'). |
|
'<br />'; |
|
} else { |
|
$current_date_description.= |
|
&mt('Current Ending Date: [_1]', |
|
&Apache::lonlocal::locallocaltime($endtime)).'<br />'; |
|
|
|
} |
my $date_table = &date_setting_table($starttime,$endtime); |
my $date_table = &date_setting_table($starttime,$endtime); |
# |
# |
if (! exists($ENV{'form.Status'}) || |
if (! exists($ENV{'form.Status'}) || |
Line 1381 $lt{'odcc'}
|
Line 1417 $lt{'odcc'}
|
<input type="hidden" name="state" value="done" /> |
<input type="hidden" name="state" value="done" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="Status" value="$ENV{'form.Status'}" /> |
<input type="hidden" name="Status" value="$ENV{'form.Status'}" /> |
|
|
<h2>$lt{'mef'} $info{'firstname'} $info{'middlename'} |
<h2>$lt{'mef'} $info{'firstname'} $info{'middlename'} |
$info{'lastname'} $info{'generation'}, $sname\@$sdom</h2> |
$info{'lastname'} $info{'generation'}, $sname\@$sdom</h2> |
<p> |
<p> |
Line 1400 $info{'lastname'} $info{'generation'}, $
|
Line 1435 $info{'lastname'} $info{'generation'}, $
|
<input type="checkbox" name="forceid" > |
<input type="checkbox" name="forceid" > |
$lt{'disn'} |
$lt{'disn'} |
</p><p> |
</p><p> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="4"/> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="14"/> |
</p> |
</p> |
|
<p>$current_date_description</p> |
<p>$date_table</p> |
<p>$date_table</p> |
<input type="submit" value="$lt{'sm'}" /> |
<input type="submit" value="$lt{'sm'}" /> |
</body></html> |
</body></html> |
Line 2066 sub handler {
|
Line 2102 sub handler {
|
} |
} |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['action','state']); |
['action','state']); |
|
|
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>"/adm/dropadd", |
|
text=>"Enrollment Manager", |
|
faq=>9,bug=>'Instructor Interface',}); |
# Needs to be in a course |
# Needs to be in a course |
if (! (($ENV{'request.course.fn'}) && |
if (! (($ENV{'request.course.fn'}) && |
(&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) { |
(&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) { |
Line 2077 sub handler {
|
Line 2119 sub handler {
|
# |
# |
# Only output the header information if they did not request csv format |
# Only output the header information if they did not request csv format |
# |
# |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['state','action']); |
if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) { |
if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) { |
$r->content_type('text/csv'); |
$r->content_type('text/csv'); |
} else { |
} else { |
Line 2088 sub handler {
|
Line 2132 sub handler {
|
# |
# |
# Main switch on form.action and form.state, as appropriate |
# Main switch on form.action and form.state, as appropriate |
if (! exists($ENV{'form.action'})) { |
if (! exists($ENV{'form.action'})) { |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enrollment Manager')); |
&print_main_menu($r); |
&print_main_menu($r); |
} elsif ($ENV{'form.action'} eq 'upload') { |
} elsif ($ENV{'form.action'} eq 'upload') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=upload&state=', |
|
text=>"Upload Classlist", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Upload Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} elsif ($ENV{'form.state'} eq 'got_file') { |
} elsif ($ENV{'form.state'} eq 'got_file') { |
Line 2104 sub handler {
|
Line 2156 sub handler {
|
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'drop') { |
} elsif ($ENV{'form.action'} eq 'drop') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=drop', |
|
text=>"Drop Students", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Drop Students')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_drop_menu($r); |
&print_drop_menu($r); |
} elsif ($ENV{'form.state'} eq 'done') { |
} elsif ($ENV{'form.state'} eq 'done') { |
Line 2112 sub handler {
|
Line 2170 sub handler {
|
&print_drop_menu($r); |
&print_drop_menu($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=enrollstudent', |
|
text=>"Enroll Student", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enroll Student')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
Line 2122 sub handler {
|
Line 2186 sub handler {
|
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'classlist') { |
} elsif ($ENV{'form.action'} eq 'classlist') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=classlist', |
|
text=>"View Classlist", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'View Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($ENV{'form.state'} eq 'csv') { |
} elsif ($ENV{'form.state'} eq 'csv') { |
Line 2132 sub handler {
|
Line 2202 sub handler {
|
&print_html_classlist($r); |
&print_html_classlist($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=modifystudent', |
|
text=>"Modify Student Data", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Modify Student Data')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($ENV{'form.state'} eq 'selected') { |
} elsif ($ENV{'form.state'} eq 'selected') { |
Line 2146 sub handler {
|
Line 2222 sub handler {
|
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
"form.action = ".$ENV{'form.action'}. |
"form.action = ".$ENV{'form.action'}. |
"Someone should fix this."); |
"Someone should fix this."); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enrollment Manager')); |
&print_main_menu($r); |
&print_main_menu($r); |
} |
} |
# |
# |