--- loncom/homework/default_homework.lcpm 2016/12/06 20:51:11 1.171
+++ loncom/homework/default_homework.lcpm 2017/01/04 19:54:47 1.172
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
#
-# $Id: default_homework.lcpm,v 1.171 2016/12/06 20:51:11 damieng Exp $
+# $Id: default_homework.lcpm,v 1.172 2017/01/04 19:54:47 damieng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -902,11 +902,19 @@ sub chemparse {
my $formula = '';
foreach my $token (@tokens) {
if ($token eq '->' ) {
- $formula .= '\ensuremath{\rightarrow} ';
+ if ($external::target eq 'web') {
+ $formula .= '→ ';
+ } else {
+ $formula .= '\ensuremath{\rightarrow} ';
+ }
next;
}
if ($token eq '<-' ) {
- $formula .= '\ensuremath{\leftarrow} ';
+ if ($external::target eq 'web') {
+ $formula .= '← ';
+ } else {
+ $formula .= '\ensuremath{\leftarrow} ';
+ }
next;
}
if ($token eq '<=>') {