--- loncom/interface/Attic/londropadd.pm 2004/02/26 22:42:21 1.103 +++ loncom/interface/Attic/londropadd.pm 2004/03/17 19:56:47 1.108 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.103 2004/02/26 22:42:21 matthew Exp $ +# $Id: londropadd.pm,v 1.108 2004/03/17 19:56:47 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -699,7 +699,7 @@ sub enroll_single_student { $ENV{'form.csec'}=~s/\W//g; # # We do the dates first because the action of making them the defaul - # in the course is entirely seperate from the action of enrolling the + # in the course is entirely separate from the action of enrolling the # student. Also, a failure in setting the dates as default is not fatal # to the process of enrolling / modifying a student. my ($startdate,$enddate) = &get_dates_from_form(); @@ -1145,7 +1145,7 @@ sub print_html_classlist { foreach my $outputformat ('html','csv','excel') { my $option = '
\n"); + $r->print(''. + "\n\n"); # # Print the classlist @@ -1183,7 +1184,7 @@ sub show_class_list { my $cid=$ENV{'request.course.id'}; # # Variables for excel output - my ($excel_workbook, $excel_sheet, $excel_filename,$row); + my ($excel_workbook, $excel_sheet, $excel_filename,$row,$format); # # Variables for csv output my ($CSVfile,$CSVfilename); @@ -1217,7 +1218,8 @@ END
+ | ||
---|---|---|
Count + | $lt{'usrn'} | $lt{'dom'} @@ -1267,14 +1269,16 @@ END $excel_workbook = Spreadsheet::WriteExcel->new('/home/httpd'. $excel_filename); $excel_workbook->set_tempdir('/home/httpd/perl/tmp'); + # + $format = &Apache::loncommon::define_excel_formats($excel_workbook); $excel_sheet = $excel_workbook->addworksheet('classlist'); # my $description = 'Class List for '. $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; - $excel_sheet->write($row++,0,$description); + $excel_sheet->write($row++,0,$description,$format->{'h1'}); # $excel_sheet->write($row++,0,["username","domain","ID", - "student name","section","status"]); + "student name","section","status"],$format->{'bold'}); } # # Sort the students @@ -1293,6 +1297,7 @@ END || lc($classlist->{$a}->[$third]) cmp lc($classlist->{$b}->[$third]) } (keys(%$classlist)); + my $studentcount = 0; foreach my $student (@Sorted_Students) { my $username = $classlist->{$student}->[$index{'username'}]; my $domain = $classlist->{$student}->[$index{'domain'}]; @@ -1302,7 +1307,7 @@ END my $status = $classlist->{$student}->[$index{'status'}]; next if (($statusmode ne 'Any') && ($status ne $statusmode)); if ($mode eq 'view') { - $r->print(" |
\n "); + $r->print(" | ||
".(++$studentcount)." | \n "); if ($linkto eq 'nothing') { $r->print($username); } elsif ($linkto eq 'aboutme') { @@ -2160,8 +2165,7 @@ sub handler { } elsif ($ENV{'form.action'} eq 'upload') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/dropadd?action=upload&state=', - text=>"Upload Classlist", - faq=>9,bug=>'Instructor Interface',}); + text=>"Upload Classlist"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs (undef,'Upload Classlist')); if (! exists($ENV{'form.state'})) { @@ -2180,8 +2184,7 @@ sub handler { } elsif ($ENV{'form.action'} eq 'drop') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/dropadd?action=drop', - text=>"Drop Students", - faq=>9,bug=>'Instructor Interface',}); + text=>"Drop Students"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs (undef,'Drop Students')); if (! exists($ENV{'form.state'})) { @@ -2194,8 +2197,7 @@ sub handler { } elsif ($ENV{'form.action'} eq 'enrollstudent') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/dropadd?action=enrollstudent', - text=>"Enroll Student", - faq=>9,bug=>'Instructor Interface',}); + text=>"Enroll Student"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs (undef,'Enroll Student')); if (! exists($ENV{'form.state'})) { @@ -2210,8 +2212,7 @@ sub handler { } elsif ($ENV{'form.action'} eq 'classlist') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/dropadd?action=classlist', - text=>"View Classlist", - faq=>9,bug=>'Instructor Interface',}); + text=>"View Classlist"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs (undef,'View Classlist')); if (! exists($ENV{'form.state'})) { @@ -2226,8 +2227,7 @@ sub handler { } elsif ($ENV{'form.action'} eq 'modifystudent') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/dropadd?action=modifystudent', - text=>"Modify Student Data", - faq=>9,bug=>'Instructor Interface',}); + text=>"Modify Student Data"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs (undef,'Modify Student Data')); if (! exists($ENV{'form.state'})) { |