--- loncom/xml/lonxml.pm 2010/05/30 02:57:01 1.505.2.1 +++ loncom/xml/lonxml.pm 2010/03/10 21:26:10 1.506 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.505.2.1 2010/05/30 02:57:01 raeburn Exp $ +# $Id: lonxml.pm,v 1.506 2010/03/10 21:26:10 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1855,26 +1855,22 @@ ENDNOTFOUND '
'.$result.
                               '
'; } - if ($env{'environment.remote'} eq 'off') { - my $brcrum; - if ($env{'request.state'} eq 'construct') { - $brcrum = [{'href' => &Apache::loncommon::authorspace(), - 'text' => 'Construction Space'}, - {'href' => '', - 'text' => $breadcrumbtext}]; - } else { - $brcrum = ''; # FIXME: Where are we? - } - my %options = ('bread_crumbs' => $brcrum, - 'bgcolor' => '#FFFFFF'); - $result = - &Apache::loncommon::start_page(undef,undef,\%options) - .$controls - .$result - .&Apache::loncommon::end_page(); + my $brcrum; + if ($env{'request.state'} eq 'construct') { + $brcrum = [{'href' => &Apache::loncommon::authorspace(), + 'text' => 'Construction Space'}, + {'href' => '', + 'text' => $breadcrumbtext}]; } else { - $result = $controls.$result; + $brcrum = ''; # FIXME: Where are we? } + my %options = ('bread_crumbs' => $brcrum, + 'bgcolor' => '#FFFFFF'); + $result = + &Apache::loncommon::start_page(undef,undef,\%options) + .$controls + .$result + .&Apache::loncommon::end_page(); } } } @@ -1905,10 +1901,6 @@ ENDNOTFOUND $header = &Apache::loncommon::head_subbox( &Apache::loncommon::CSTR_pageheader()); } - if ($env{'environment.remote'} ne 'off') { - $options{'bgcolor'} = '#FFFFFF'; - $options{'only_body'} = 1; - } my $js = &Apache::edit::js_change_detection(). &Apache::loncommon::resize_textarea_js(); @@ -2291,20 +2283,24 @@ sub get_tag { =pod -=item &print_pdf_radiobutton(fieldname, value) +=item &print_pdf_radiobutton(fieldname, value, text) -Returns a latexline to generate a PDF-Form-Radiobutton. -Note: Radiobuttons with equal names are automaticly grouped - in a selection-group. +Returns a latexline to generate a PDF-Form-Radiobutton with Text. -$fieldname: PDF internalname of the radiobutton(group) -$value: Value of radiobutton +$fieldname: PDF internalname of the radiobutton +$value: Value of radiobutton (read when dumping the PDF data) +$text: Text on the rightside of the radiobutton =cut sub print_pdf_radiobutton { - my ($fieldname, $value) = @_; - return '\radioButton[\symbolchoice{circle}]{' - .$fieldname.'}{10bp}{10bp}{'.$value.'}'; + my $result = ''; + my ($fieldName, $value, $text) = @_; + $result .= '\begin{tabularx}{\textwidth}{p{0cm}X}'."\n"; + $result .= '\radioButton[\symbolchoice{circle}]{'. + $fieldName.'}{10bp}{10bp}{'.$value.'}&'.$text."\n"; + $result .= '\end{tabularx}' . "\n"; + $result .= '\hspace{2mm}' . "\n"; + return $result; }