[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 21 Jan 2008 10:24:24 -0000
foxr Mon Jan 21 05:24:24 2008 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
BZ 4251 - Added problem type dropdown for constrution space prints.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.511 loncom/interface/lonprintout.pm:1.512
--- loncom/interface/lonprintout.pm:1.511 Mon Jan 14 05:43:12 2008
+++ loncom/interface/lonprintout.pm Mon Jan 21 05:24:23 2008
@@ -1,8 +1,7 @@
-#
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.511 2008/01/14 10:43:12 foxr Exp $
+# $Id: lonprintout.pm,v 1.512 2008/01/21 10:24:23 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1342,6 +1341,8 @@
</script>
ENDPART
+
+
my $start_page = &Apache::loncommon::start_page('Preparing Printout',$js);
my $msg = &mt('Please stand by while processing your print request, this may take some time ...');
@@ -1375,6 +1376,7 @@
my @print_array=();
my @student_names=();
+
# Common settings for the %form has:
# In some cases these settings get overriddent by specific cases, but the
# settings are common enough to make it worthwhile factoring them out
@@ -1412,6 +1414,7 @@
$currentURL=$helper->{'VARS'}->{'postdata'};
$cleanURL=&Apache::lonenc::check_decrypt($currentURL);
} else {
+
#prints resource from the construction space
$currentURL='/'.$helper->{'VARS'}->{'filename'};
if ($currentURL=~/([^?]+)/) {$currentURL=$1;}
@@ -2462,7 +2465,7 @@
$helper->{VARS}->{'curseed'}=$env{'form.curseed'};
}
if (!$helper->{VARS}->{'probstatus'} && $env{'form.problemtype'}) {
- $helper->{VARS}->{'probstatus'}=$env{'form.problemtype'};
+ $helper->{VARS}->{'probstatus'}=$env{'form.problemstatus'};
}
my $userCanSeeHidden = Apache::lonnavmaps::advancedUser();
@@ -3088,6 +3091,24 @@
<message></td></tr></message>
RNDSEED
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
+
+
+ addMessage("<tr><td>Problem Type:</td><td>");
+ $paramHash = &Apache::lonhelper::getParamHash();
+ $paramHash->{'variable'} = 'probstatus'; # Already declared:
+ #
+ # Initial value from construction space:
+ #
+ if (!$helper->{VARS}->{'probstatus'} && $env{'form.problemtype'}) {
+ $helper->{VARS}->{'probstatus'} = $env{'form.problemtype'}; # initial value
+ }
+ $paramHash->{CHOICES} = [
+ ['Homework problem', 'problem'],
+ ['Exam Problem', 'exam'],
+ ['Survey question', 'survey']];
+ Apache::lonhelper::dropdown->new();
+ addMessage("</td></tr>");
+
}
}