Create a formula with a division
-
Good Morning
Some results of calculations required to make a division. How to integrate a division in formulas?
Thank you for your answer.
Christophe
-
Hi Chris!
Hmm.. As I see now it’s not allows any maht operators like “+-/*”. https://github.com/garex/wp-testing/blob/develop/src/Model/Formula.php#L133
I think we need to add em.
In the meantime, can you provide some example of such formula?
May be it could be rewritten somehow?Chris, do you know French?
It will be good if you could review current plugin French translation. See https://www.transifex.com/projects/p/wp-testing/language/fr_FR/
Currently we have there all auto-translated and noone from the whole France will able to check that.
Hello Alexander
Thank you for your quick response.
In fact, I would like to create “simple” tests where results are sums of responses which must then be divided.
For example, the scale of orientations to happiness, published by Seligman.
The total of the 3 guidelines should be divided by 6 to match different scales.
total-vie-engagee / 6
total-vie-plaisante /6
total-vie-signifiante /6For the translation, I’ll see how. Thank you for the link.
Thank you for your help.
ChristopheChristophe, as I see from what I can found: https://hal.archives-ouvertes.fr/hal-01061671/document
We have for some question some coefficient (.567) and 5 answers.
Current workaround before new feature will be available
To avoid division later you can multiple before.
So instead of setting in scores values like 1,2,3,4,5 you can set there premultiplied values like 1*.567,2*.567,3*.567,4*.567,5*.567 which will be 0.567, 1.134, 1.701, 2.268 and 2.835 respectfully.
But I’m nor completely understand the model of those test still. Anyway I think we should add those Math operators.
Regarding your concrete case you can set in scores not 1,2,3 …, but 0.1666666667, 0.3333333333, 0.5.
Thank you Alexander. I’ll try it right away.
Moreover, and this has nothing to do with the previous topic, I just noticed a bug with editing tests.
Indeed, when I created a new test, the number of characters in the description (editing window like editing articles) is limited to 243:-(
The problem appeared today as yesterday and before yesterday I created other tests and the bug did not appear.
The joys of plugin’s creation π
thank you for your support
ChristopheChristophe, regarding another bug pls create standalone topic.
OK. Let’s go…
Hello Alexander
I tried the alternative above, but here’s the error message.
Too bad, it was a great idea.The following problems were found:
WpTesting Model Question #1
WpTesting Model Answer #1
WpTesting Model Score #2
Score Value: Please enter a number between -128 and 127
WpTesting Model Answer #2
WpTesting Model Score #2
Score Value: Please enter a number between -128 and 127
WpTesting Model Answer #4
WpTesting Model Score #2
Score Value: Please enter a number between -128 and 127
WpTesting Model Answer #5
WpTesting Model Score #2
Score Value: Please enter a number between -128 and 127
WpTesting Model Question #2
WpTesting Model Answer #1
WpTesting Model Score #3
…
etc.. etc…I hope you can find a fix.
see you soon
ChristopheAhh!..
Yes I see now β we have there tinyint column, which doesn’t allow 0.123 values.
I’ll add this additionally to allow such values.
Hello Christophe,
I’ll plan to release hotfix tomorrow.
If will start translating, pls register as reviewer β at https://www.transifex.com/projects/p/wp-testing/language/fr_FR/ we already have all strings translated.
But those translation is auto-robot-google-translate-quality. So main issue here is that we need someone who knows French from zero years and can approve and/or correct existing translations. You will see that reviewed langiages has dark progressbar, whether non-reviewed β light.
Hello Christophe,
I see your translations! Thanks!
Can we then mark all translations in FR as reviewed? Did you check all other is ok?
Can I use your name/email to add you to thankyou board?
Christophe PEIFFER[Moderated – please don’t post other people’s emails on the forums]In the meantime new changes are testing now: https://travis-ci.org/garex/wp-testing
Hello Alexander
You’re welcome πYes you can. Anyway, I made the translation of the entire file. So for me it’s OK.
Happy to use my name and email in the acknowledgments.If you want to see how I’ve used the plugin, here are some examples:
- http://www.leblogdesrapportshumains.fr/test/etes-vous-satisfait-de-votre-vie/
- http://www.leblogdesrapportshumains.fr/test/test-estime-de-soi/
- http://www.leblogdesrapportshumains.fr/test/test-de-personnalite/
With the update for the formulas, I should add, too.
See you soon
ChristopheChristophe, hotfix released. See 0.9.4
The topic ‘Create a formula with a division’ is closed to new replies.