version 1.179, 2007/09/10 16:07:32
|
version 1.181, 2007/11/09 20:56:34
|
Line 642 ENDHEADER
|
Line 642 ENDHEADER
|
} |
} |
# More than one possible role |
# More than one possible role |
# ----------------------------------------------------------------------- Table |
# ----------------------------------------------------------------------- Table |
unless (($advanced) || ($nochoose)) { |
unless ((!&Apache::lonmenu::show_course()) || ($nochoose)) { |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
} |
} |
$r->print('<br /><table id="LC_rolesmenu"><tr>'); |
$r->print('<br /><table id="LC_rolesmenu"><tr>'); |
Line 965 END
|
Line 965 END
|
return $verify_script; |
return $verify_script; |
} |
} |
|
|
sub processpick { |
|
my $process_pick = <<"END"; |
|
<script type="text/javascript"> |
|
function process_pick(dom) { |
|
var pickedCourse=opener.document.rolechoice.$env{'form.cnumelement'}.value; |
|
var pickedDomain=opener.document.rolechoice.$env{'form.cdomelement'}.value; |
|
var okDomain = 0; |
|
|
|
if (pickedDomain == dom) { |
|
if (pickedCourse != '') { |
|
var courseTarget = "cc./"+pickedDomain+"/"+pickedCourse |
|
opener.document.title='Role selected. Please stand by.'; |
|
opener.status='Role selected. Please stand by.'; |
|
opener.document.rolechoice.newrole.value=courseTarget |
|
opener.document.rolechoice.submit() |
|
} |
|
} else { |
|
alert("You may only use this screen to select courses in the current domain: "+dom+"\\nPlease return to the roles page window and click the 'Select Course' link for domain: "+pickedDomain+",\\n if you are a Domain Coordinator in that domain, and wish to become a Course Coordinator in a course in the domain"); |
|
} |
|
} |
|
|
|
</script> |
|
END |
|
return $process_pick; |
|
} |
|
|
|
sub display_cc_role { |
sub display_cc_role { |
my $rolekey = shift; |
my $rolekey = shift; |
my $roletext; |
my $roletext; |