version 1.564, 2009/04/23 13:32:18
|
version 1.565, 2009/05/01 01:07:49
|
Line 7701 sub grade_student_bubbles {
|
Line 7701 sub grade_student_bubbles {
|
|
|
sub scantron_upload_scantron_data { |
sub scantron_upload_scantron_data { |
my ($r)=@_; |
my ($r)=@_; |
$r->print(&Apache::loncommon::coursebrowser_javascript($env{'request.role.domain'})); |
my $dom = $env{'request.role.domain'}; |
|
my $domdesc = &Apache::lonnet::domain($dom,'description'); |
|
$r->print(&Apache::loncommon::coursebrowser_javascript($dom)); |
my $select_link=&Apache::loncommon::selectcourse_link('rules','courseid', |
my $select_link=&Apache::loncommon::selectcourse_link('rules','courseid', |
'domainid', |
'domainid', |
'coursename'); |
'coursename',$dom); |
my $domsel=&Apache::loncommon::select_dom_form($env{'request.role.domain'}, |
my $syllabuslink = '<a href="javascript:ToSyllabus();">'.&mt('Syllabus').'</a>'. |
'domainid'); |
(' 'x2).&mt('(shows course personnel)'); |
my $default_form_data=&defaultFormData(&get_symb($r,1)); |
my $default_form_data=&defaultFormData(&get_symb($r,1)); |
$r->print(' |
$r->print(' |
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
Line 7715 sub scantron_upload_scantron_data {
|
Line 7717 sub scantron_upload_scantron_data {
|
alert("'.&mt('Please use the browse button to select a file from your local directory.').'"); |
alert("'.&mt('Please use the browse button to select a file from your local directory.').'"); |
return false; |
return false; |
} |
} |
|
if (formname.courseid.value == "") { |
|
alert("'.&mt('Please use the \"Select Course\" link to open a separate window where you can search for a course to which a file can be uploaded.').'"); |
|
return false; |
|
} |
formname.submit(); |
formname.submit(); |
} |
} |
|
|
|
function ToSyllabus() { |
|
var cdom = '."'$dom'".'; |
|
var cnum = document.rules.courseid.value; |
|
if (cdom == "" || cdom == null) { |
|
return; |
|
} |
|
if (cnum == "" || cnum == null) { |
|
return; |
|
} |
|
syllwin=window.open("/public/"+cdom+"/"+cnum+"/syllabus","LONCAPASyllabus", |
|
"height=350,width=350,scrollbars=yes,menubar=no"); |
|
return; |
|
} |
|
|
</script> |
</script> |
|
|
<form enctype="multipart/form-data" action="/adm/grades" name="rules" method="post"> |
<form enctype="multipart/form-data" action="/adm/grades" name="rules" method="post"> |
'.$default_form_data.' |
'.$default_form_data. |
<table> |
&Apache::lonhtmlcommon::start_pick_box(). |
<tr><td>'.$select_link.' </td></tr> |
&Apache::lonhtmlcommon::row_title(&mt('Course ID')). |
<tr><td>'.&mt('Course ID:').' </td> |
'<input name="courseid" type="text" size="30" />'.$select_link. |
<td><input name="courseid" type="text" /> </td></tr> |
&Apache::lonhtmlcommon::row_closure(). |
<tr><td>'.&mt('Course Name:').' </td> |
&Apache::lonhtmlcommon::row_title(&mt('Course Name')). |
<td><input name="coursename" type="text" /> </td></tr> |
'<input name="coursename" type="text" size="30" />'.$syllabuslink. |
<tr><td>'.&mt('Domain:').' </td> |
&Apache::lonhtmlcommon::row_closure(). |
<td>'.$domsel.' </td></tr> |
&Apache::lonhtmlcommon::row_title(&mt('Domain')). |
<tr><td>'.&mt('File to upload:').'</td> |
'<input name="domainid" type="hidden" />'.$domdesc. |
<td><input type="file" name="upfile" size="50" /></td></tr> |
&Apache::lonhtmlcommon::row_closure(). |
</table> |
&Apache::lonhtmlcommon::row_title(&mt('File to upload')). |
|
'<input type="file" name="upfile" size="50" />'. |
|
&Apache::lonhtmlcommon::row_closure(1). |
|
&Apache::lonhtmlcommon::end_pick_box().'<br /> |
|
|
<input name="command" value="scantronupload_save" type="hidden" /> |
<input name="command" value="scantronupload_save" type="hidden" /> |
<input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Scantron Data').'" /> |
<input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Scantron Data').'" /> |
</form> |
</form> |