version 1.9, 2012/03/31 12:02:29
|
version 1.12, 2014/12/11 00:33:22
|
Line 33 use Apache::loncommon;
|
Line 33 use Apache::loncommon;
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonnavmaps; |
use Apache::lonnavmaps; |
use Apache::loncourserespicker; |
use Apache::loncourserespicker; |
|
use Apache::londocs; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Cwd; |
use Cwd; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
Line 114 sub exportcourse {
|
Line 115 sub exportcourse {
|
} |
} |
$r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package')); |
$r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); |
|
$r->print(&Apache::londocs::startContentScreen('tools')); |
$r->print($outcome); |
$r->print($outcome); |
|
$r->print(&Apache::londocs::endContentScreen()); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} else { |
} else { |
$r->print(&Apache::loncourserespicker::create_picker($navmap,'imsexport', |
$r->print(&Apache::loncourserespicker::create_picker($navmap,'imsexport', |
Line 670 sub simpleproblem {
|
Line 673 sub simpleproblem {
|
%values = &evaloptionhash($options); |
%values = &evaloptionhash($options); |
$output .= qq| |
$output .= qq| |
<problem> |
<problem> |
|
<startouttext />$qtext<endouttext /> |
<optionresponse max="$maxfoils" randomize="$randomize"> |
<optionresponse max="$maxfoils" randomize="$randomize"> |
<foilgroup options="$options"> |
<foilgroup options="$options"> |
|; |
|; |
Line 698 sub simpleproblem {
|
Line 702 sub simpleproblem {
|
} else { |
} else { |
$output .= qq| |
$output .= qq| |
<problem> |
<problem> |
|
<startouttext />$qtext<endouttext /> |
<radiobuttonresponse max="$maxfoils" randomize="$randomize"> |
<radiobuttonresponse max="$maxfoils" randomize="$randomize"> |
<foilgroup> |
<foilgroup> |
|; |
|; |
for (my $k=0; $k<10; $k++) { |
for (my $k=0; $k<10; $k++) { |
my $iter = $k+1; |
my $iter = $k+1; |
Line 724 sub simpleproblem {
|
Line 729 sub simpleproblem {
|
</problem> |
</problem> |
|; |
|; |
} |
} |
} elsif ($qtype eq 'stringanswer') { |
} elsif ($qtype eq 'string') { |
my $stringanswer = $qparms{$prefix.'stringanswer'}; |
my $stringanswer = $qparms{$prefix.'stringanswer'}; |
my $stringtype=$qparms{$prefix.'stringtype'}; |
my $stringtype=$qparms{$prefix.'stringtype'}; |
$output .= qq| |
$output .= qq| |
<problem> |
<problem> |
<stringresponse answer="$stringanswer" type="$stringtype"> |
<stringresponse answer="$stringanswer" type="$stringtype"> |
<textline> |
<startouttext />$qtext<endouttext /> |
</textline> |
<textline /> |
|; |
|; |
if ($hint) { |
if ($hint) { |
$output .= ' |
$output .= ' |
Line 745 sub simpleproblem {
|
Line 750 sub simpleproblem {
|
</stringresponse> |
</stringresponse> |
</problem> |
</problem> |
|; |
|; |
|
} elsif ($qtype eq 'numerical') { |
|
my $sigfigs = $qparms{$prefix.'numericalsigfigs'}; |
|
my $unit = $qparms{$prefix.'numericalunit'}; |
|
my $answer = $qparms{$prefix.'numericalanswer'}; |
|
my $tolerance = $qparms{$prefix.'numericaltolerance'}; |
|
my $format = $qparms{$prefix.'numericalformat'}; |
|
my $scriptblock = $qparms{$prefix.'numericalscript'}; |
|
$output .= qq| |
|
<problem> |
|
|; |
|
if ($scriptblock) { |
|
$output .= qq| |
|
<script type="loncapa/perl"> |
|
$scriptblock |
|
</script>|; |
|
} |
|
$output .= qq| |
|
<startouttext />$qtext<endouttext /> |
|
<numericalresponse answer="$answer" |; |
|
if ($unit ne '') { |
|
$output .= qq|unit="$unit" |; |
|
} |
|
if ($format ne '') { |
|
$output .= qq|format="$format" |; |
|
} |
|
$output =~ s{ $}{}; |
|
$output .= '>'; |
|
if ($tolerance ne '') { |
|
$output .= qq| |
|
<responseparam name="tol" type="tolerance" default="$tolerance" description="Numerical Tolerance" />|; |
|
} |
|
if ($sigfigs) { |
|
$output .= qq| |
|
<responseparam name="sig" type="int_range" default="$sigfigs" description="Significant Digits" />|; |
|
} |
|
$output .= qq| |
|
<textline />|; |
|
if ($hint) { |
|
$output .= qq| |
|
<hintgroup> |
|
<hintpart on="default"> |
|
<startouttext />'.$hint.'<endouttext/> |
|
</hintpart> |
|
</hintgroup>|; |
|
} |
|
$output .= qq| |
|
</numericalresponse> |
|
</problem> |
|
|; |
} else { |
} else { |
$output .= qq| |
$output .= qq| |
<problem> |
<problem> |
Line 843 sub templatedpage {
|
Line 897 sub templatedpage {
|
<domain>$udom</domain> |
<domain>$udom</domain> |
|; |
|; |
} |
} |
foreach (sort keys %syllabusfields) { |
foreach (sort(keys(%syllabusfields))) { |
$output .= qq| |
$output .= qq| |
<$_> |
<$_> |
<name>$syllabusfields{$_}</name> |
<name>$syllabusfields{$_}</name> |