version 1.350, 2006/04/11 20:20:53
|
version 1.355, 2006/05/28 16:47:02
|
Line 1143 sub sub_page_kw_js {
|
Line 1143 sub sub_page_kw_js {
|
my $iconpath = $request->dir_config('lonIconsURL'); |
my $iconpath = $request->dir_config('lonIconsURL'); |
&commonJSfunctions($request); |
&commonJSfunctions($request); |
|
|
my $inner_js=<<INNERJS; |
my $inner_js_msg_central=<<INNERJS; |
<script text="text/javascript"> |
<script text="text/javascript"> |
function checkInput() { |
function checkInput() { |
opener.document.SCORE.msgsub.value = opener.checkEntities(document.msgcenter.msgsub.value); |
opener.document.SCORE.msgsub.value = opener.checkEntities(document.msgcenter.msgsub.value); |
Line 1184 sub sub_page_kw_js {
|
Line 1184 sub sub_page_kw_js {
|
</script> |
</script> |
INNERJS |
INNERJS |
|
|
my $start_page = |
my $inner_js_highlight_central=<<INNERJS; |
&Apache::loncommon::start_page('MessageCentral',$inner_js, |
<script type="text/javascript"> |
|
function updateChoice(flag) { |
|
opener.document.SCORE.kwclr.value = opener.radioSelection(document.hlCenter.kwdclr); |
|
opener.document.SCORE.kwsize.value = opener.radioSelection(document.hlCenter.kwdsize); |
|
opener.document.SCORE.kwstyle.value = opener.radioSelection(document.hlCenter.kwdstyle); |
|
opener.document.SCORE.refresh.value = "on"; |
|
if (opener.document.SCORE.keywords.value!=""){ |
|
opener.document.SCORE.submit(); |
|
} |
|
self.close() |
|
} |
|
</script> |
|
INNERJS |
|
|
|
my $start_page_msg_central = |
|
&Apache::loncommon::start_page('Message Central',$inner_js_msg_central, |
{'js_ready' => 1, |
{'js_ready' => 1, |
'only_body' => 1, |
'only_body' => 1, |
'bgcolor' =>'#FFFFFF',}); |
'bgcolor' =>'#FFFFFF',}); |
my $end_page = |
my $end_page_msg_central = |
|
&Apache::loncommon::end_page({'js_ready' => 1}); |
|
|
|
|
|
my $start_page_highlight_central = |
|
&Apache::loncommon::start_page('Highlight Central', |
|
$inner_js_highlight_central, |
|
{'js_ready' => 1, |
|
'only_body' => 1, |
|
'bgcolor' =>'#FFFFFF',}); |
|
my $end_page_highlight_central = |
&Apache::loncommon::end_page({'js_ready' => 1}); |
&Apache::loncommon::end_page({'js_ready' => 1}); |
|
|
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
Line 1307 INNERJS
|
Line 1332 INNERJS
|
pWin.focus(); |
pWin.focus(); |
pDoc = pWin.document; |
pDoc = pWin.document; |
pDoc.$docopen; |
pDoc.$docopen; |
pDoc.write('$start_page'); |
pDoc.write('$start_page_msg_central'); |
|
|
pDoc.write("<form action=\\"inactive\\" name=\\"msgcenter\\">"); |
pDoc.write("<form action=\\"inactive\\" name=\\"msgcenter\\">"); |
pDoc.write("<input value=\\""+usrctr+"\\" name=\\"usrctr\\" type=\\"hidden\\">"); |
pDoc.write("<input value=\\""+usrctr+"\\" name=\\"usrctr\\" type=\\"hidden\\">"); |
Line 1348 INNERJS
|
Line 1373 INNERJS
|
pDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:checkInput()\\"> "); |
pDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:checkInput()\\"> "); |
pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
pDoc.write("</form>"); |
pDoc.write("</form>"); |
pDoc.write('$end_page'); |
pDoc.write('$end_page_msg_central'); |
pDoc.close(); |
pDoc.close(); |
} |
} |
|
|
Line 1394 INNERJS
|
Line 1419 INNERJS
|
hwdWin.focus(); |
hwdWin.focus(); |
var hDoc = hwdWin.document; |
var hDoc = hwdWin.document; |
hDoc.$docopen; |
hDoc.$docopen; |
hDoc.write("<html><head>"); |
hDoc.write('$start_page_highlight_central'); |
hDoc.write("<title>Highlight Central</title>"); |
|
|
|
hDoc.write("<script language=javascript>"); |
|
hDoc.write("function updateChoice(flag) {"); |
|
hDoc.write(" opener.document.SCORE.kwclr.value = opener.radioSelection(document.hlCenter.kwdclr);"); |
|
hDoc.write(" opener.document.SCORE.kwsize.value = opener.radioSelection(document.hlCenter.kwdsize);"); |
|
hDoc.write(" opener.document.SCORE.kwstyle.value = opener.radioSelection(document.hlCenter.kwdstyle);"); |
|
hDoc.write(" opener.document.SCORE.refresh.value = \\"on\\";"); |
|
hDoc.write(" if (opener.document.SCORE.keywords.value!=\\"\\"){"); |
|
hDoc.write(" opener.document.SCORE.submit();"); |
|
hDoc.write(" }"); |
|
hDoc.write(" self.close()"); |
|
hDoc.write("}"); |
|
|
|
hDoc.write("<"); |
|
hDoc.write("/script>"); |
|
|
|
hDoc.write("</head><body bgcolor=white>"); |
|
|
|
hDoc.write("<form action=\\"inactive\\" name=\\"hlCenter\\">"); |
hDoc.write("<form action=\\"inactive\\" name=\\"hlCenter\\">"); |
hDoc.write("<font color=\\"green\\" size=+1> Keyword Highlight Options</font><br /><br />"); |
hDoc.write("<font color=\\"green\\" size=+1> Keyword Highlight Options</font><br /><br />"); |
|
|
Line 1441 INNERJS
|
Line 1447 INNERJS
|
hDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:updateChoice(1)\\"> "); |
hDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:updateChoice(1)\\"> "); |
hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
hDoc.write("</form>"); |
hDoc.write("</form>"); |
hDoc.write("</body></html>"); |
hDoc.write('$end_page_highlight_central'); |
hDoc.close(); |
hDoc.close(); |
} |
} |
|
|
Line 2436 sub handback_files {
|
Line 2442 sub handback_files {
|
($env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter} =~ /^(.*?)([^\/]*)$/); |
($env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter} =~ /^(.*?)([^\/]*)$/); |
my ($answer_name,$answer_ver,$answer_ext) = |
my ($answer_name,$answer_ver,$answer_ext) = |
&file_name_version_ext($answer_file); |
&file_name_version_ext($answer_file); |
$directory =~ /^.+$stuname\/portfolio(.*)/; |
my ($portfolio_path) = ($directory =~ /^.+$stuname\/portfolio(.*)/); |
my $portfolio_path = $1; |
|
my @dir_list = &Apache::lonnet::dirlist($portfolio_path,$domain,$stuname,$portfolio_root); |
my @dir_list = &Apache::lonnet::dirlist($portfolio_path,$domain,$stuname,$portfolio_root); |
my $version = &get_next_version($answer_name, $answer_ext, \@dir_list); |
my $version = &get_next_version($answer_name, $answer_ext, \@dir_list); |
my $new_answer = &version_selected_portfile($domain, $stuname, $portfolio_path, $answer_file, $version); |
my $new_answer = &version_selected_portfile($domain, $stuname, $portfolio_path, $answer_file, $version); |
$$newrecord{"resource.$new_part.$resp_id.handback"} = $new_answer; |
$$newrecord{"resource.$new_part.$resp_id.handback"} = $new_answer; |
# set the filename to match the submitted file name |
$version++; |
$env{'form.'.$newflg.'_'.$part_resp.'_returndoc1.filename'} = $env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter}; |
# fix file name |
my $result=&Apache::lonnet::userfileupload($newflg.'_'.$part_resp.'_returndoc'.$file_counter,'', |
my ($save_file_name) = (($directory.$answer_name.".$version.".$answer_ext) =~ /^.+\/${stuname}\/(.*)/); |
'portfolio',undef,undef,undef,$stuname,$domain); |
my $result=&Apache::lonnet::finishuserfileupload($stuname,$domain, |
|
$newflg.'_'.$part_resp.'_returndoc'.$file_counter, |
|
$save_file_name); |
if ($result !~ m|^/uploaded/|) { |
if ($result !~ m|^/uploaded/|) { |
$request->print('<font color="red"> An errror occured ('.$result. |
$request->print('<font color="red"> An errror occured ('.$result. |
') while trying to upload '.&display_file().'</font><br />'); |
') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</font><br />'); |
# $request->print(&done('Back')); |
|
} |
} |
$request->print("<br />".$fname." will be the uploaded file name"); |
$request->print("<br />".$fname." will be the uploaded file name"); |
$request->print("<font color=\"red\">Will upload document </font>".$env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter}); |
$request->print(" ".$env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter}); |
$file_counter++; |
$file_counter++; |
} |
} |
} |
} |
Line 4825 $warning
|
Line 4831 $warning
|
<input type="hidden" name="command" value="scantron_validate" /> |
<input type="hidden" name="command" value="scantron_validate" /> |
STUFF |
STUFF |
} |
} |
$r->print("</form><br />".&show_grading_menu_form($symb)."</body></html>"); |
$r->print("</form><br />".&show_grading_menu_form($symb)); |
return ''; |
return ''; |
} |
} |
|
|
Line 4926 STUFF
|
Line 4932 STUFF
|
$r->print(" this scanline saving it for later."); |
$r->print(" this scanline saving it for later."); |
} |
} |
} |
} |
$r->print(" </form><br />".&show_grading_menu_form($symb). |
$r->print(" </form><br />".&show_grading_menu_form($symb)); |
"</body></html>"); |
|
return ''; |
return ''; |
} |
} |
|
|
Line 5930 sub handler {
|
Line 5935 sub handler {
|
if ($#commands > 0) { |
if ($#commands > 0) { |
&Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands)); |
&Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands)); |
} |
} |
&send_header($request); |
$request->print(&Apache::loncommon::start_page('Grading')); |
if ($symb eq '' && $command eq '') { |
if ($symb eq '' && $command eq '') { |
if ($env{'user.adv'}) { |
if ($env{'user.adv'}) { |
if (($env{'form.codeone'}) && ($env{'form.codetwo'}) && |
if (($env{'form.codeone'}) && ($env{'form.codetwo'}) && |
Line 6021 sub handler {
|
Line 6026 sub handler {
|
$request->print("Access Denied ($command)"); |
$request->print("Access Denied ($command)"); |
} |
} |
} |
} |
&send_footer($request); |
|
return ''; |
|
} |
|
|
|
sub send_header { |
|
my ($request)= @_; |
|
&Apache::lontexconvert::init_tth(); |
|
$request->print(&Apache::loncommon::start_page('Grading')); |
|
$request->rflush(); |
|
} |
|
|
|
sub send_footer { |
|
my ($request)= @_; |
|
$request->print(&Apache::loncommon::end_page()); |
$request->print(&Apache::loncommon::end_page()); |
|
return ''; |
} |
} |
|
|
1; |
1; |