version 1.428.2.1, 2007/08/24 07:15:27
|
version 1.428.2.2, 2007/09/05 00:22:20
|
Line 7072 sub gather_clicker_ids {
|
Line 7072 sub gather_clicker_ids {
|
# Set up a couple variables. |
# Set up a couple variables. |
my $username_idx = &Apache::loncoursedata::CL_SNAME(); |
my $username_idx = &Apache::loncoursedata::CL_SNAME(); |
my $domain_idx = &Apache::loncoursedata::CL_SDOM(); |
my $domain_idx = &Apache::loncoursedata::CL_SDOM(); |
|
my $status_idx = &Apache::loncoursedata::CL_STATUS(); |
|
|
foreach my $student (keys(%$classlist)) { |
foreach my $student (keys(%$classlist)) { |
|
if ($classlist->{$student}->[$status_idx] ne 'Active') { next; } |
my $username = $classlist->{$student}->[$username_idx]; |
my $username = $classlist->{$student}->[$username_idx]; |
my $domain = $classlist->{$student}->[$domain_idx]; |
my $domain = $classlist->{$student}->[$domain_idx]; |
my $clickers = |
my $clickers = |
Line 7335 ENDHEADER
|
Line 7336 ENDHEADER
|
$result.="\n".'<input type="hidden" name="correct:'.$correct_count.':'.$correct_ids{$id}.'" value="'.$responses{$id}.'" />'; |
$result.="\n".'<input type="hidden" name="correct:'.$correct_count.':'.$correct_ids{$id}.'" value="'.$responses{$id}.'" />'; |
$correct_count++; |
$correct_count++; |
} elsif ($clicker_ids{$id}) { |
} elsif ($clicker_ids{$id}) { |
$result.="\n".'<input type="hidden" name="student:'.$clicker_ids{$id}.'" value="'.$responses{$id}.'" />'; |
if ($clicker_ids{$id}=~/\,/) { |
$student_count++; |
# More than one user with the same clicker! |
|
$result.="\n<hr />".&mt('Clicker registered more than once').": <tt>".$id."</tt><br />"; |
|
$result.="\n".'<input type="hidden" name="unknown:'.$id.'" value="'.$responses{$id}.'" />'. |
|
"<select name='multi".$id."'>"; |
|
foreach my $reguser (sort(split(/\,/,$clicker_ids{$id}))) { |
|
$result.="<option value='".$reguser."'>".&Apache::loncommon::plainname(split(/\:/,$reguser)).' ('.$reguser.')</option>'; |
|
} |
|
$result.='</select>'; |
|
$unknown_count++; |
|
} else { |
|
# Good: found one and only one user with the right clicker |
|
$result.="\n".'<input type="hidden" name="student:'.$clicker_ids{$id}.'" value="'.$responses{$id}.'" />'; |
|
$student_count++; |
|
} |
} else { |
} else { |
$result.="\n<hr />".&mt('Unregistered Clicker')." <tt>".$id."</tt><br />"; |
$result.="\n<hr />".&mt('Unregistered Clicker')." <tt>".$id."</tt><br />"; |
$result.="\n".'<input type="hidden" name="unknown:'.$id.'" value="'.$responses{$id}.'" />'. |
$result.="\n".'<input type="hidden" name="unknown:'.$id.'" value="'.$responses{$id}.'" />'. |
Line 7487 ENDHEADER
|
Line 7501 ENDHEADER
|
my $id=$1; |
my $id=$1; |
if (($env{'form.uname'.$id}) && ($env{'form.udom'.$id})) { |
if (($env{'form.uname'.$id}) && ($env{'form.udom'.$id})) { |
$user=$env{'form.uname'.$id}.':'.$env{'form.udom'.$id}; |
$user=$env{'form.uname'.$id}.':'.$env{'form.udom'.$id}; |
|
} elsif ($env{'form.multi'.$id}) { |
|
$user=$env{'form.multi'.$id}; |
} |
} |
} |
} |
if ($user) { |
if ($user) { |