version 1.27, 2010/11/28 00:04:10
|
version 1.30, 2011/03/05 22:25:09
|
Line 1330 sub create_mcq {
|
Line 1330 sub create_mcq {
|
my $numfoils = scalar(@{$qstnref}) - 1; |
my $numfoils = scalar(@{$qstnref}) - 1; |
my $datestamp = localtime; |
my $datestamp = localtime; |
my $numansrs = scalar(@{$answerref}); |
my $numansrs = scalar(@{$answerref}); |
my $output = '<problem> |
my $output = '<problem>'; |
|
if ($qtype eq 'MC') { |
|
$output .= "\n".'<parameter name="maxtries" type="int_pos" default="2" description="Maximum Number of Tries" />'; |
|
} |
|
$output .= ' |
<startouttext />'; |
<startouttext />'; |
if ($res eq 'application/rtf' || $res eq 'text/html') { |
if ($res eq 'application/rtf' || $res eq 'text/html') { |
if ($header ne '') { |
if ($header ne '') { |
Line 1800 sub print_header {
|
Line 1804 sub print_header {
|
{'bread_crumbs' => $brcrum, |
{'bread_crumbs' => $brcrum, |
'add_entries' => $loadentries}); |
'add_entries' => $loadentries}); |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
$output .= '<p class="LC_warning">' |
$output .= '<p class="LC_info">' |
.&mt('Co-Author [_1]',$uname.':'.$udom) |
.&mt('Co-Author [_1]',$uname.':'.$udom) |
.'</p>'; |
.'</p>'; |
} |
} |
Line 1942 sub handler {
|
Line 1946 sub handler {
|
my ($result,$flag) = &Apache::lonupload::phasetwo($r,$fn,$uname,$udom,'testbank'); |
my ($result,$flag) = &Apache::lonupload::phasetwo($r,$fn,$uname,$udom,'testbank'); |
$r->print($result); |
$r->print($result); |
if ($flag eq 'ok') { |
if ($flag eq 'ok') { |
|
my $current_page = 0; |
my $js; |
my $js; |
&jscript_zero($webpath,\$js); |
&jscript_zero($webpath,\$js); |
$js = '<script type="text/javascript">'."\n$js\n".'</script>'; |
$js = '<script type="text/javascript">'."\n$js\n".'</script>'; |