Comments (4)
Here is a sample problem to demonstrate the issue.
DOCUMENT();
loadMacros(qw(
PGstandard.pl PGML.pl parserPopUp.pl parserRadioButtons.pl parserCheckboxList.pl parserRadioMultiAnswer.pl
));
@a = (3,2,1,0);
$d = DropDown([@a], 3);
$r = RadioButtons([@a], 3);
$c = CheckboxList([@a], [3]);
$rma = RadioMultiAnswer([map{[$_]}(@a)], 3);
BEGIN_PGML
[_]{$d}
[_]{$r}
[_]{$c}
[_]{$rma}
END_PGML
ENDDOCUMENT();
from pg.
One thing I think we should do regardless of settling on consistent default behavior, is give a way for authors to declare that they actually want the other behavior. So I propose:
- We make PopUp behave like the others: when the answer is specified as a number, and that number is small enough to make sense as an index, then it is interpreted as an index.
- For DropDown, RadioButtons, CheckboxList, we add an option you can pass, like
literal => 1
. So for example when "0" is the fourth answer, specifying "0" as an answer withliteral => 1
would make the macro understand that the fourth answer is the correct answer. Instead of thinking the 0th index answer is the correct one. - Not sure how CheckboxList works right now, but we should make sure that if any of the specified correct answers fails to be a valid index, then all of the specified answers are interpreted as literal. Because why would someone mix indices and literal answers?
from pg.
I am working on a branch that updates parserPopUp.pl
similar to how @drgrice1 updated parserRadioButtons.pl
. It is necessarily different because with HTML select options, there is no HTML label element for each option (like there is for each radio button). Instead the HTML option element has a value
attribute and a label
attribute. The text inside the option is sort of irrelevant, except that it is the fallback for value
and label
when either is missing.
from pg.
Related Issues (20)
- Bug when a matrix Math Object is reused as an answer HOT 10
- PGML.pl has lines that should have been removed. HOT 1
- checkboxlist within a RadioMultiAnswer HOT 4
- Using upToConstant with complex numbers HOT 4
- keyboard issue with GraphTool HOT 8
- run-perltidy deletes .bak files
- Error answers now are escaped when they shouldn't be. HOT 1
- Cropping from pgfplots is not always working for final SVG output HOT 13
- variables declared with `my` lead to errors HOT 1
- student answers get spaces normalized
- PGstatisticsmacros error HOT 2
- Inconsistent/incomplete behaviour for radio button custom answer checkers HOT 3
- inserting an answer between two multiAnswer inputs HOT 13
- issue with `q` and parsing in PGML HOT 9
- PGML bold within a word HOT 3
- Macros whose first line starts with =head1 fail to load. HOT 6
- answer hints in multiple choice HOT 13
- CheckboxList reveals the correct answers HOT 3
- MathQuill toolbar placement in a relatively positioned parent - bug when in an RTL course. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.