version 1.543, 2008/10/02 17:12:18
|
version 1.549, 2009/02/18 07:06:15
|
Line 1281 sub recently_generated {
|
Line 1281 sub recently_generated {
|
$cuid,$cgid,$crdev,$csize, |
$cuid,$cgid,$crdev,$csize, |
$catime,$cmtime,$cctime, |
$catime,$cmtime,$cctime, |
$cblksize,$cblocks)=stat($prtspool.'/'.$filename); |
$cblksize,$cblocks)=stat($prtspool.'/'.$filename); |
my $result="<a href='/prtspool/$filename'>". |
my $ext_text = 'pdf' ? &mt('PDF File'):&mt('Zip File'); |
&mt('Generated [_1] ([_2] bytes)', |
my $result=&Apache::loncommon::start_data_table_row() |
&Apache::lonlocal::locallocaltime($cctime),$csize). |
.'<td>' |
'</a><br />'; |
.'<a href="/prtspool/'.$filename.'">'.$ext_text.'</a>' |
|
.'</td>' |
|
.'<td>'.&Apache::lonlocal::locallocaltime($cctime).'</td>' |
|
.'<td align="right">'.$csize.'</td>' |
|
.&Apache::loncommon::end_data_table_row(); |
if ($ext eq 'pdf') { $pdf_result .= $result; } |
if ($ext eq 'pdf') { $pdf_result .= $result; } |
if ($ext eq 'zip') { $zip_result .= $result; } |
if ($ext eq 'zip') { $zip_result .= $result; } |
} |
} |
|
if ($zip_result || $pdf_result) { |
|
$r->print('<hr />'); |
|
} |
if ($zip_result) { |
if ($zip_result) { |
$r->print('<h4>'.&mt('Recently generated printout zip files')."</h4>\n" |
$r->print('<h3>'.&mt('Recently generated printout zip files')."</h3>\n" |
.$zip_result); |
.&Apache::loncommon::start_data_table() |
|
.&Apache::loncommon::start_data_table_header_row() |
|
.'<th>'.&mt('Download').'</th>' |
|
.'<th>'.&mt('Creation Date').'</th>' |
|
.'<th>'.&mt('File Size (Bytes)').'</th>' |
|
.&Apache::loncommon::end_data_table_header_row() |
|
.$zip_result |
|
.&Apache::loncommon::end_data_table() |
|
); |
} |
} |
if ($pdf_result) { |
if ($pdf_result) { |
$r->print('<h4>'.&mt('Recently generated printouts')."</h4>\n" |
$r->print('<h3>'.&mt('Recently generated printouts')."</h3>\n" |
.$pdf_result); |
.&Apache::loncommon::start_data_table() |
|
.&Apache::loncommon::start_data_table_header_row() |
|
.'<th>'.&mt('Download').'</th>' |
|
.'<th>'.&mt('Creation Date').'</th>' |
|
.'<th>'.&mt('File Size (Bytes)').'</th>' |
|
.&Apache::loncommon::end_data_table_header_row() |
|
.$pdf_result |
|
.&Apache::loncommon::end_data_table() |
|
); |
} |
} |
} |
} |
|
|
Line 1520 ENDPART
|
Line 1543 ENDPART
|
&Apache::lonnet::appenv({'construct.style' => |
&Apache::lonnet::appenv({'construct.style' => |
$helper->{'VARS'}->{'style_file'}}); |
$helper->{'VARS'}->{'style_file'}}); |
} elsif ($env{'construct.style'}) { |
} elsif ($env{'construct.style'}) { |
&Apache::lonnet::delenv('construct\\.style'); |
&Apache::lonnet::delenv('construct.style'); |
} |
} |
|
|
|
|
Line 2464 sub get_randomly_ordered_warning {
|
Line 2487 sub get_randomly_ordered_warning {
|
|
|
my $postdata = $env{'form.postdata'} || $helper->{VARS}{'postdata'}; |
my $postdata = $env{'form.postdata'} || $helper->{VARS}{'postdata'}; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $res = $navmap->getResourceByUrl($map); |
if (defined($navmap)) { |
if ($res) { |
my $res = $navmap->getResourceByUrl($map); |
my $func = |
if ($res) { |
sub { return ($_[0]->is_map() && $_[0]->randomorder); }; |
my $func = |
my @matches = $navmap->retrieveResources($res, $func,1,1,1); |
sub { return ($_[0]->is_map() && $_[0]->randomorder); }; |
if (@matches) { |
my @matches = $navmap->retrieveResources($res, $func,1,1,1); |
$message = "Some of the items below are in folders set to be randomly ordered. However, when printing the contents of these folders, they will be printed in the original order for all students, not the randomized order."; |
if (@matches) { |
} |
$message = "Some of the items below are in folders set to be randomly ordered. However, when printing the contents of these folders, they will be printed in the original order for all students, not the randomized order."; |
} |
} |
if ($message) { |
} |
return '<message type="warning">'.$message.'</message>'; |
if ($message) { |
|
return '<message type="warning">'.$message.'</message>'; |
|
} |
|
} else { |
|
&Apache::lonnet::logthis('Retrieval of resources to check for folders set to be randomly ordered failed - could not create navmap object'); |
|
$message = "Retrieval of information about ordering of resources failed."; |
|
return '<message type="warning">'.$message.'</message>'; |
} |
} |
return; |
return; |
} |
} |
Line 2673 sub printHelper {
|
Line 2702 sub printHelper {
|
$helper->{VARS}->{'postdata'} && |
$helper->{VARS}->{'postdata'} && |
$helper->{VARS}->{'assignment'}) { |
$helper->{VARS}->{'assignment'}) { |
# Allow problems from sequence |
# Allow problems from sequence |
push @{$printChoices}, [&mt('Selected <b>Problems</b> in folder <b><i>[_1]</i></b>',$sequenceTitle), 'map_problems', 'CHOOSE_PROBLEMS']; |
push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>'), 'map_problems', 'CHOOSE_PROBLEMS']; |
# Allow all resources from sequence |
# Allow all resources from sequence |
push @{$printChoices}, [&mt('Selected <b>Resources</b> in folder <b><i>[_1]</i></b>',$sequenceTitle), 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML']; |
push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>'), 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML']; |
|
|
my $helperFragment = <<HELPERFRAGMENT; |
my $helperFragment = <<HELPERFRAGMENT; |
<state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print"> |
<state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print"> |
Line 2704 HELPERFRAGMENT
|
Line 2733 HELPERFRAGMENT
|
&Apache::lonxml::xmlparse($r, 'helper', $helperFragment); |
&Apache::lonxml::xmlparse($r, 'helper', $helperFragment); |
} |
} |
|
|
# If the user has pfo (print for otheres) allow them to print all |
# If the user has pfo (print for others) allow them to print all |
# problems and resources in the entier course, optionally for selected students |
# problems and resources in the entire course, optionally for selected students |
if ($perm{'pfo'} && !$is_published && |
if ($perm{'pfo'} && !$is_published && |
($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) { |
($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) { |
|
|
Line 2755 HELPERFRAGMENT
|
Line 2784 HELPERFRAGMENT
|
ALL_PROBLEMS |
ALL_PROBLEMS |
|
|
if ($helper->{VARS}->{'assignment'}) { |
if ($helper->{VARS}->{'assignment'}) { |
push @{$printChoices}, [&mt("Selected <b>Problems</b> from folder <b><i>[_1]</i></b> for <b>selected people</b>",$sequenceTitle), 'problems_for_students', 'CHOOSE_STUDENTS']; |
push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]selected people[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'problems_for_students', 'CHOOSE_STUDENTS']; |
push @{$printChoices}, [&mt("Selected <b>Problems</b> from folder <b><i>[_1]</i></b> for <b>CODEd assignments</b>",$sequenceTitle), 'problems_for_anon', 'CHOOSE_ANON1']; |
push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]CODEd assignments[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'problems_for_anon', 'CHOOSE_ANON1']; |
} |
} |
|
|
my $randomly_ordered_warning = |
my $randomly_ordered_warning = |
Line 2934 CHOOSE_ANON1
|
Line 2963 CHOOSE_ANON1
|
|
|
|
|
if ($helper->{VARS}->{'assignment'}) { |
if ($helper->{VARS}->{'assignment'}) { |
push @{$printChoices}, [&mt("Selected <b>Resources</b> from folder <b><i>[_1]</i></b> for <b>selected people</b>",$sequenceTitle), 'resources_for_students', 'CHOOSE_STUDENTS1']; |
push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]selected people[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_students', 'CHOOSE_STUDENTS1']; |
push @{$printChoices}, [&mt("Selected <b>Resources</b> from folder <b><i>[_1]</i></b> for <b>CODEd assignments</b>",$sequenceTitle), 'resources_for_anon', 'CHOOSE_ANON2']; |
push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]CODEd assignments[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_anon', 'CHOOSE_ANON2']; |
} |
} |
|
|
|
|
Line 3058 CHOOSE_ANON2
|
Line 3087 CHOOSE_ANON2
|
) { |
) { |
|
|
my $pretty_dir = &Apache::lonnet::hreflocation($subdir); |
my $pretty_dir = &Apache::lonnet::hreflocation($subdir); |
push @{$printChoices}, [&mt("Selected <b>Problems</b> from current subdirectory <b><i>[_1]</i></b>",$pretty_dir), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR']; |
push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from current subdirectory [_3]','<b>','</b>','<b><i>'.$pretty_dir.'</i></b>','<b>','</b>'), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR']; |
my $xmlfrag = <<CHOOSE_FROM_SUBDIR; |
my $xmlfrag = <<CHOOSE_FROM_SUBDIR; |
<state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$pretty_dir</small></b> to print"> |
<state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$pretty_dir</small></b> to print"> |
|
|
Line 3128 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3157 CHOOSE_FROM_ANY_SEQUENCE
|
|
|
if (($perm{'pav'} and &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) or |
if (($perm{'pav'} and &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) or |
($helper->{VARS}->{'construction'} eq '1')) { |
($helper->{VARS}->{'construction'} eq '1')) { |
addMessage("<hr width='33%' /><table><tr><td align='right'>". |
&addMessage('<br />' |
'<label for="ANSWER_TYPE_forminput">'. |
.'<h3>'.&mt('Print Options').'</h3>' |
&mt('Print'). |
.&Apache::lonhtmlcommon::start_pick_box() |
"</label>: </td><td>"); |
# .&Apache::lonhtmlcommon::row_headline() |
|
# .'<h3>'.&mt('Print Options').'</h3>' |
|
# .&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title( |
|
'<label for="ANSWER_TYPE_forminput">' |
|
.&mt('Print Answers') |
|
.'</label>' |
|
) |
|
); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = 'ANSWER_TYPE'; |
$paramHash->{'variable'} = 'ANSWER_TYPE'; |
$helper->declareVar('ANSWER_TYPE'); |
$helper->declareVar('ANSWER_TYPE'); |
Line 3141 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3178 CHOOSE_FROM_ANY_SEQUENCE
|
['Only Answers', 'only'] |
['Only Answers', 'only'] |
]; |
]; |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure()); |
$startedTable = 1; |
$startedTable = 1; |
} |
} |
|
|
Line 3153 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3190 CHOOSE_FROM_ANY_SEQUENCE
|
"</label>: </td><td>"); |
"</label>: </td><td>"); |
$startedTable = 1; |
$startedTable = 1; |
} else { |
} else { |
addMessage("<tr><td align='right'>". |
&addMessage(&Apache::lonhtmlcommon::row_title( |
'<label for="LATEX_TYPE_forminput">'. |
'<label for="LATEX_TYPE_forminput">' |
&mt('LaTeX mode'). |
.&mt('LaTeX mode') |
"</label>: </td><td>"); |
.'</label>' |
|
) |
|
); |
} |
} |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = 'LATEX_TYPE'; |
$paramHash->{'variable'} = 'LATEX_TYPE'; |
Line 3172 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3211 CHOOSE_FROM_ANY_SEQUENCE
|
} |
} |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
|
|
addMessage("</td></tr><tr><td align='right'>". |
&addMessage(&Apache::lonhtmlcommon::row_closure() |
'<label for="TABLE_CONTENTS_forminput">'. |
.&Apache::lonhtmlcommon::row_title( |
&mt('Print Table of Contents'). |
'<label for="TABLE_CONTENTS_forminput">' |
"</label>: </td><td>"); |
.&mt('Print Table of Contents') |
|
.'</label>' |
|
) |
|
); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = 'TABLE_CONTENTS'; |
$paramHash->{'variable'} = 'TABLE_CONTENTS'; |
$helper->declareVar('TABLE_CONTENTS'); |
$helper->declareVar('TABLE_CONTENTS'); |
Line 3183 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3225 CHOOSE_FROM_ANY_SEQUENCE
|
['No', 'no'], |
['No', 'no'], |
['Yes', 'yes'] ]; |
['Yes', 'yes'] ]; |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure()); |
|
|
if (not $helper->{VARS}->{'construction'}) { |
if (not $helper->{VARS}->{'construction'}) { |
addMessage("<tr><td align='right'>". |
&addMessage(&Apache::lonhtmlcommon::row_title( |
'<label for="TABLE_INDEX_forminput">'. |
'<label for="TABLE_INDEX_forminput">' |
&mt('Print Index'). |
.&mt('Print Index') |
"</label>: </td><td>"); |
.'</label>' |
|
) |
|
); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = 'TABLE_INDEX'; |
$paramHash->{'variable'} = 'TABLE_INDEX'; |
$helper->declareVar('TABLE_INDEX'); |
$helper->declareVar('TABLE_INDEX'); |
Line 3197 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3241 CHOOSE_FROM_ANY_SEQUENCE
|
['No', 'no'], |
['No', 'no'], |
['Yes', 'yes'] ]; |
['Yes', 'yes'] ]; |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure()); |
addMessage("<tr><td align='right'>". |
&addMessage(&Apache::lonhtmlcommon::row_title( |
'<label for="PRINT_DISCUSSIONS_forminput">'. |
'<label for="PRINT_DISCUSSIONS_forminput">' |
&mt('Print Discussions'). |
.&mt('Print Discussions') |
"</label>: </td><td>"); |
.'</label>' |
|
) |
|
); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = 'PRINT_DISCUSSIONS'; |
$paramHash->{'variable'} = 'PRINT_DISCUSSIONS'; |
$helper->declareVar('PRINT_DISCUSSIONS'); |
$helper->declareVar('PRINT_DISCUSSIONS'); |
Line 3209 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3255 CHOOSE_FROM_ANY_SEQUENCE
|
['No', 'no'], |
['No', 'no'], |
['Yes', 'yes'] ]; |
['Yes', 'yes'] ]; |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure()); |
|
|
# Prompt for printing annotations too. |
# Prompt for printing annotations too. |
|
|
addMessage("<tr><td align='right'>". |
&addMessage(&Apache::lonhtmlcommon::row_title( |
'<label for="PRINT_ANNOTATIONS_forminput">'. |
'<label for="PRINT_ANNOTATIONS_forminput">' |
&mt('Print Annotations'). |
.&mt('Print Annotations') |
"</label>:</td><td>"); |
.'</label>' |
|
) |
|
); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'variable'} = "PRINT_ANNOTATIONS"; |
$paramHash->{'variable'} = "PRINT_ANNOTATIONS"; |
$helper->declareVar("PRINT_ANNOTATIONS"); |
$helper->declareVar("PRINT_ANNOTATIONS"); |
Line 3224 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3272 CHOOSE_FROM_ANY_SEQUENCE
|
['No', 'no'], |
['No', 'no'], |
['Yes', 'yes']]; |
['Yes', 'yes']]; |
Apache::lonhelper::dropdown->new(); |
Apache::lonhelper::dropdown->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure()); |
|
|
addMessage("<tr><td align = 'right'> </td><td>"); |
&addMessage(&Apache::lonhtmlcommon::row_title(&mt('Foils'))); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash = Apache::lonhelper::getParamHash(); |
$paramHash->{'multichoice'} = "true"; |
$paramHash->{'multichoice'} = "true"; |
$paramHash->{'allowempty'} = "true"; |
$paramHash->{'allowempty'} = "true"; |
$paramHash->{'variable'} = "showallfoils"; |
$paramHash->{'variable'} = "showallfoils"; |
$paramHash->{'CHOICES'} = [ ["Show all foils", "1"] ]; |
$paramHash->{'CHOICES'} = [ ["Show all foils", "1"] ]; |
Apache::lonhelper::choices->new(); |
Apache::lonhelper::choices->new(); |
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure(1)); |
} |
} |
|
|
if ($helper->{'VARS'}->{'construction'}) { |
if ($helper->{'VARS'}->{'construction'}) { |
Line 3242 CHOOSE_FROM_ANY_SEQUENCE
|
Line 3290 CHOOSE_FROM_ANY_SEQUENCE
|
my $stylefiletext=&mt("Use style file"); |
my $stylefiletext=&mt("Use style file"); |
my $selectfiletext=&mt("Select style file"); |
my $selectfiletext=&mt("Select style file"); |
|
|
my $xmlfrag .= <<"RNDSEED"; |
my $xmlfrag .= '<message>' |
<message><tr><td align='right'> |
.&Apache::lonhtmlcommon::row_title('<label for="curseed_forminput">' |
<label for="curseed_forminput">$randseedtext</label>: |
.$randseedtext |
</td><td></message> |
.'</label>' |
<string variable="curseed" size="15" maxlength="15"> |
) |
<defaultvalue> |
.'</message> |
return $helper->{VARS}->{'curseed'}; |
<string variable="curseed" size="15" maxlength="15"> |
</defaultvalue> |
<defaultvalue> |
</string> |
return '.$helper->{VARS}->{'curseed'}.'; |
<message></td></tr><tr><td align="right"> |
</defaultvalue>' |
<label for="style_file">$stylefiletext</label>: |
.'</string>' |
</td><td></message> |
.'<message>' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title('<label for="style_file">' |
|
.$stylefiletext |
|
.'</label>' |
|
) |
|
.'</message> |
<string variable="style_file" size="40"> |
<string variable="style_file" size="40"> |
<defaultvalue> |
<defaultvalue> |
return $stylevalue; |
return '.$stylevalue.'; |
</defaultvalue> |
</defaultvalue> |
</string><message> <a href="javascript:openbrowser('helpform','style_file_forminput','sty')">$selectfiletext</a> </td></tr><tr><td></td><td align="left"></message> |
</string><message> ' |
|
.qq|<a href="javascript:openbrowser('helpform','style_file_forminput','sty')">| |
|
.$selectfiletext.'</a>' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Show all foils')) |
|
.'</message> |
<choices allowempty="1" multichoice="true" variable="showallfoils"> |
<choices allowempty="1" multichoice="true" variable="showallfoils"> |
<choice computer="1">Show all foils</choice> |
<choice computer="1"> </choice> |
</choices> |
</choices>' |
<message></td></tr></message> |
.'<message>' |
RNDSEED |
.&Apache::lonhtmlcommon::row_closure() |
|
.'</message>'; |
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); |
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); |
|
|
|
|
addMessage("<tr><td>Problem Type:</td><td>"); |
&addMessage(&Apache::lonhtmlcommon::row_title(&mt('Problem Type'))); |
# |
# |
# Initial value from construction space: |
# Initial value from construction space: |
# |
# |
Line 3286 RNDSEED
|
Line 3346 RNDSEED
|
PROBTYPE |
PROBTYPE |
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); |
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); |
|
|
addMessage("</td></tr>"); |
&addMessage(&Apache::lonhtmlcommon::row_closure(1)); |
|
|
} |
} |
} |
} |
|
|
|
|
|
|
|
|
if ($startedTable) { |
if ($startedTable) { |
addMessage("</table>"); |
&addMessage(&Apache::lonhtmlcommon::end_pick_box()); |
} |
} |
|
|
Apache::lonprintout::page_format_state->new("FORMAT"); |
Apache::lonprintout::page_format_state->new("FORMAT"); |
Line 3397 sub render {
|
Line 3457 sub render {
|
my $pdfFormLabel=&mt('PDF-Formfields'); |
my $pdfFormLabel=&mt('PDF-Formfields'); |
my $with=&mt('with Formfields'); |
my $with=&mt('with Formfields'); |
my $without=&mt('without Formfields'); |
my $without=&mt('without Formfields'); |
$result .= <<STATEHTML; |
$result.='<h3>'.&mt('Layout Options').'</h3>' |
|
.&Apache::loncommon::start_data_table() |
|
.&Apache::loncommon::start_data_table_header_row() |
|
.'<th>'.$PageLayout.'</th>' |
|
.'<th>'.$NumberOfColumns.'</th>' |
|
.'<th>'.$PaperType.'</th>' |
|
.'<th>'.$pdfFormLabel.'</th>' |
|
.&Apache::loncommon::end_data_table_header_row() |
|
.&Apache::loncommon::start_data_table_row() |
|
.'<td>' |
|
.'<label><input type="radio" name="'.${var}.'.layout" value="L" />'.$landscape.'</label><br />' |
|
.'<label><input type="radio" name="'.${var}.'.layout" value="P" checked="checked" />'.$portrait.'</label>' |
|
.'</td>'; |
|
|
<hr width="33%" /> |
$result.='<td align="center">' |
<table cellpadding="3"> |
.'<select name="'.${var}.'.cols">'; |
<tr> |
|
<td align="center"><b>$PageLayout</b></td> |
|
<td align="center"><b>$NumberOfColumns</b></td> |
|
<td align="center"><b>$PaperType</b></td> |
|
<td align="center"><b>$pdfFormLabel</b></td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<label><input type="radio" name="${var}.layout" value="L" /> $landscape </label><br /> |
|
<label><input type="radio" name="${var}.layout" value="P" checked='1' /> $portrait </label> |
|
</td> |
|
<td align="center"> |
|
<select name="${var}.cols"> |
|
STATEHTML |
|
|
|
my $i; |
my $i; |
for ($i = 1; $i <= $maxColumns; $i++) { |
for ($i = 1; $i <= $maxColumns; $i++) { |
Line 3452 STATEHTML
|
Line 3510 STATEHTML
|
<option value='yes'>$with</option> |
<option value='yes'>$with</option> |
</select> |
</select> |
</td> |
</td> |
</tr></table> |
|
HTML |
HTML |
|
$result.=&Apache::loncommon::end_data_table_row() |
|
.&Apache::loncommon::end_data_table(); |
|
|
return $result; |
return $result; |
} |
} |
Line 3577 sub render {
|
Line 3636 sub render {
|
} else { |
} else { |
$size{'margin'} += 2.54; |
$size{'margin'} += 2.54; |
} |
} |
my %text = ('format' => 'How should each column be formatted?', |
my %lt = &Apache::lonlocal::texthash( |
'width' => 'Width:', |
'format' => 'How should each column be formatted?', |
'height' => 'Height:', |
'width' => 'Width', |
'margin' => 'Left Margin:',); |
'height' => 'Height', |
%text = &Apache::lonlocal::texthash(%text); |
'margin' => 'Left Margin' |
|
); |
$result .= <<ELEMENTHTML; |
|
|
$result .= '<p>'.$lt{'format'}.'</p>' |
<p>$text{'format'}</p> |
.&Apache::lonhtmlcommon::start_pick_box() |
|
.&Apache::lonhtmlcommon::row_title($lt{'width'}) |
<table cellpadding='3'> |
.'<input type="text" name="'.$var.'.width" value="'.$size{'width'}.'" size="4" />' |
<tr> |
.'<select name="'.$var.'.widthunit">' |
<td align='right'><b>$text{'width'}</b></td> |
.$size{'width_options'} |
<td align='left'><input type='text' name='$var.width' value="$size{'width'}" size='4' /></td> |
.'</select>' |
<td align='left'> |
.&Apache::lonhtmlcommon::row_closure() |
<select name='$var.widthunit'> |
.&Apache::lonhtmlcommon::row_title($lt{'height'}) |
$size{'width_options'} |
.'<input type="text" name="'.$var.'.height" value="'.$size{'height'}.'" size="4" />' |
</select> |
.'<select name="'.$var.'.heightunit">' |
</td> |
.$size{'height_options'} |
</tr> |
.'</select>' |
<tr> |
.&Apache::lonhtmlcommon::row_closure() |
<td align='right'><b>$text{'height'}</b></td> |
.&Apache::lonhtmlcommon::row_title($lt{'margin'}) |
<td align='left'><input type='text' name="$var.height" value="$size{'height'}" size='4' /></td> |
.'<input type="text" name="'.$var.'.lmargin" value="'.$size{'margin'}.'" size="4" />' |
<td align='left'> |
.'<select name="'.$var.'.lmarginunit">' |
<select name='$var.heightunit'> |
.$size{'margin_options'} |
$size{'height_options'} |
.'</select>' |
</select> |
.&Apache::lonhtmlcommon::row_closure(1) |
</td> |
.&Apache::lonhtmlcommon::end_pick_box(); |
</tr> |
# <p>Hint: Some instructors like to leave scratch space for the student by |
<tr> |
# making the width much smaller than the width of the page.</p> |
<td align='right'><b>$text{'margin'}</b></td> |
|
<td align='left'><input type='text' name='$var.lmargin' value="$size{'margin'}" size='4' /></td> |
|
<td align='left'> |
|
<select name='$var.lmarginunit'> |
|
$size{'margin_options'} |
|
</select> |
|
</td> |
|
</tr> |
|
</table> |
|
|
|
<!--<p>Hint: Some instructors like to leave scratch space for the student by |
|
making the width much smaller than the width of the page.</p>--> |
|
|
|
ELEMENTHTML |
|
|
|
return $result; |
return $result; |
} |
} |