version 1.169, 2014/06/25 16:50:51
|
version 1.172, 2017/01/04 19:54:47
|
Line 902 sub chemparse {
|
Line 902 sub chemparse {
|
my $formula = ''; |
my $formula = ''; |
foreach my $token (@tokens) { |
foreach my $token (@tokens) { |
if ($token eq '->' ) { |
if ($token eq '->' ) { |
$formula .= '<m>\ensuremath{\rightarrow}</m> '; |
if ($external::target eq 'web') { |
|
$formula .= '→ '; |
|
} else { |
|
$formula .= '<m>\ensuremath{\rightarrow}</m> '; |
|
} |
next; |
next; |
} |
} |
if ($token eq '<-' ) { |
if ($token eq '<-' ) { |
$formula .= '<m>\ensuremath{\leftarrow}</m> '; |
if ($external::target eq 'web') { |
|
$formula .= '← '; |
|
} else { |
|
$formula .= '<m>\ensuremath{\leftarrow}</m> '; |
|
} |
next; |
next; |
} |
} |
if ($token eq '<=>') { |
if ($token eq '<=>') { |
Line 1228 sub sec {
|
Line 1236 sub sec {
|
} |
} |
|
|
sub submission { |
sub submission { |
my ($partid,$responseid,$subnumber,$encode,$cleanupnum)=@_; |
my ($partid,$responseid,$subnumber,$encode,$cleanupnum,$mapalias)=@_; |
my $sub=''; |
my $sub=''; |
if ($subnumber) { $sub=$subnumber.':'; } |
if ($subnumber) { $sub=$subnumber.':'; } |
my $output = |
my $output = |
&EXT('user.resource.'.$sub.'resource.'.$partid.'.'.$responseid.'.submission'); |
&EXT('user.resource.'.$sub.'resource.'.$partid.'.'.$responseid.'.submission',$mapalias); |
if (ref($output) eq 'ARRAY') { |
if (ref($output) eq 'ARRAY') { |
my @items = @{$output}; |
my @items = @{$output}; |
if ($encode) { |
if ($encode) { |
Line 1458 sub proper_path {
|
Line 1466 sub proper_path {
|
} |
} |
} |
} |
|
|
|
sub input_id { |
|
my ($part_id, $response_id, $textline_id) = @_; |
|
return 'HWVAL_'.$part_id.'_'.$response_id.'_'.$textline_id; |
|
} |
|
|