--- loncom/interface/Attic/londropadd.pm 2007/08/31 03:22:51 1.169 +++ 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.169 2007/08/31 03:22:51 raeburn Exp $ +# $Id: londropadd.pm,v 1.170 2007/09/27 18:58:52 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1365,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') { @@ -1391,6 +1397,7 @@ END 'end' => "end date", 'type' => "enroll type/action", 'email' => "email address", + 'clicker'=> "clicker id", 'photo' => "photo", ); unless ($mode eq 'autoenroll') { @@ -1447,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', @@ -1463,6 +1488,9 @@ END ' '."\n"); } $r->print(" \n"); + +# Done with the HTML header line + } elsif ($mode eq 'csv') { # # Open a file @@ -1515,6 +1543,9 @@ END "active groups","email address"], $format->{'bold'}); } + +# Done with header lines in all formats + # # Sort the students my %index; @@ -1623,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') {