Skip to content

Commit

Permalink
Merge pull request #188 from goehle/2.10-bugfixes
Browse files Browse the repository at this point in the history
2.10 bugfixes
  • Loading branch information
goehle committed Dec 26, 2014
2 parents 2060469 + fcae617 commit 6fce3c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Applet.pm
Expand Up @@ -1146,7 +1146,7 @@ END_HEADER_SCRIPT
use constant GEOGEBRAWEB_OBJECT_TEXT =><<'END_OBJECT_TEXT';
<script language="javascript">ww_applet_list["$appletName"].visible = 1; // don't submit things if not visible
</script>
<script type="text/javascript" language="javascript" src="https://www.geogebra.org/web/4.4/web/web.nocache.js"></script>
<script type="text/javascript" language="javascript" src="//web.geogebra.org/4.4/web/web.nocache.js"></script>
$webgeogebraParameters
Expand Down
16 changes: 15 additions & 1 deletion macros/parserPopUp.pl
Expand Up @@ -119,7 +119,21 @@ sub MENU {
};
$menu .= "</SELECT>";
} elsif ($main::displayMode eq "TeX") {
$menu = "\\fbox{?}";
# if the total number of characters is not more than
# 30 and not containing / or ] then we print out
# the select as a string: [A/B/C]
if (length(join('',@$list)) < 25 &&
!grep(/(\/|\[|\])/,@$list)) {

$menu = '['.join('/',@$list).']';
} else {
#otherwise we print a bulleted list
$menu = "\n\\begin{itemize}\n";
foreach my $option (@$list) {
$menu .= "\\item{$option}\n";
}
$menu .= "\\end{itemize}\n";
}
}
main::RECORD_ANS_NAME($name,$answer_value) unless $extend; # record answer name
$menu;
Expand Down

0 comments on commit 6fce3c5

Please sign in to comment.