version 1.8.4.2, 2009/12/07 18:47:31
|
version 1.8.4.3, 2009/12/07 22:33:26
|
Line 145 sub gcitest_switcher {
|
Line 145 sub gcitest_switcher {
|
return $output; |
return $output; |
} |
} |
|
|
|
sub gcitest_switcher_js { |
|
my ($current,$numcourses) = @_; |
|
my $output = <<"ENDJS"; |
|
|
|
function courseswitcher(caller) { |
|
var numcourses = $numcourses; |
|
var current = '$current'; |
|
var choice = document.pickrole.newrole.options[document.pickrole.newrole.selectedIndex].value; |
|
if (choice == '') { |
|
if (caller == 'icon') { |
|
alert('No Concept Test selected'); |
|
} |
|
document.pickrole.selectrole.value = ''; |
|
return; |
|
} |
|
if (choice == current) { |
|
if ((caller != 'icon') && (numcourses > 1)) { |
|
alert('You have selected the current course.\\nPlease select a different Concept Test course'); |
|
} |
|
document.pickrole.newrole.selectedIndex = 0; |
|
document.pickrole.selectrole.value = ''; |
|
return; |
|
} |
|
document.pickrole.selectrole.value = '1'; |
|
document.pickrole.submit(); |
|
return; |
|
} |
|
|
|
ENDJS |
|
return $output; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |
|
|