--- loncom/interface/Attic/londropadd.pm 2007/08/29 04:12:33 1.168 +++ loncom/interface/Attic/londropadd.pm 2007/09/27 18:58:52 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.168 2007/08/29 04:12:33 raeburn Exp $ +# $Id: londropadd.pm,v 1.170 2007/09/27 18:58:52 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -984,6 +984,7 @@ sub get_student_username_domain_form { $jscript

$lt{'eos'}

END + $r->print($response); $r->print(&single_user_entry_form($defdom,$srch,$forcenewuser)); return; } @@ -1364,6 +1365,11 @@ sub show_class_list { } my $displayphotos = $env{'form.displayphotos'}; + if (! exists($env{'form.displayclickers'})) { + $env{'form.displayclickers'} = 'off'; + } + my $displayclickers = $env{'form.displayclickers'}; + # Print out header unless ($mode eq 'autoenroll') { $r->print(<print(< + END if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') { if ($linkto eq 'aboutme') { @@ -1390,6 +1397,7 @@ END 'end' => "end date", 'type' => "enroll type/action", 'email' => "email address", + 'clicker'=> "clicker id", 'photo' => "photo", ); unless ($mode eq 'autoenroll') { @@ -1446,6 +1454,24 @@ function photowindow(photolink) { $lt{'email'} END + +# Clicker display on or off? + + my %clicker_options = &Apache::lonlocal::texthash( + 'on' => 'Show', + 'off' => 'Hide', + ); + my $clickerchg = 'on'; + if ($displayclickers eq 'on') { + $clickerchg = 'off'; + } + $r->print(' '."\n".' '. + ''. + $clicker_options{$clickerchg}.' '.$lt{'clicker'}."\n". + ' '."\n"); + +# Photo display on or off? if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { my %photo_options = &Apache::lonlocal::texthash( 'on' => 'Show', @@ -1462,6 +1488,9 @@ END ' '."\n"); } $r->print(" \n"); + +# Done with the HTML header line + } elsif ($mode eq 'csv') { # # Open a file @@ -1514,6 +1543,9 @@ END "active groups","email address"], $format->{'bold'}); } + +# Done with header lines in all formats + # # Sort the students my %index; @@ -1622,6 +1654,19 @@ END $active_groups $email END + +# Clickers + if ($displayclickers eq 'on') { + my $clickers = + (&Apache::lonnet::userenvironment($domain,$username,'clickers'))[1]; + if ($clickers!~/\w/) { $clickers='-'; } + $r->print(''.$clickers.''); + } else { + $r->print('   '); + } + +# Photos + if ($env{'course.'.$env{'request.course.id'}. '.internal.showphoto'}) { if ($displayphotos eq 'on') {