Wiris

Documentation / WirisQuizzes

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Miscellaneous

                      • Wiris Integrations

                        • Home
                        • WirisQuizzes
                        • Validation Options
                        • Grading functions
                        • Grading functions

                        Keep arguments as strings

                        Reading time: 1min

                        As mentioned in the previous section, it's possible to transfer all the assertions you can handle inside WirisQuizzes Studio to a grading function. You just need to select the Unevaluated option and use the corresponding notation.

                        Unfortunately, there is one exception regarding this transfer process. To track trailing zeros, the Precision assertion needs to transfer the student's answer as a string.

                        Thus, you will need to select the String in case you want to create a grading function where checking the number of significant figures or decimal places is required. Let's imagine, with a formative perspective, that we want only to accept answers with a random absolute error and between 2 and 4 significant figures.

                        The corresponding grading function will require the student's answer to satisfy the error condition to receive some grade, which will only be the full mark if it also has between 2 and 4 significant figures.

                        Tip

                        Notice there are two particularities regarding the notation in this type of grading function:

                        As the student's answer is transferred as a string, we need to evaluate it before comparing it with another value. We need to use the expression() command for this purpose.

                        The _check_precision() command requires four arguments: the student's answer, the minimum and maximum number of significant figures or decimal values the answer must have, and a boolean to indicate if we want to check significant figures (true) or decimal places (false). You can see more details here.

                        Thus, we will be able to answer with any value inside the acceptance interval between 2 and 4 significant figures.

                         

                        Was this article helpful?

                        Give feedback about this article

                        Related Articles

                        • Testing
                        • semantics/annotation/annotation-xml

                        Empowering STEM education

                        MathType

                        • Office Tools
                        • LMS
                        • XML
                        • HTML

                        WirisQuizzes

                        Learning Lemur

                        Integrations

                        Solutions

                        • Education
                        • Publishing houses – platforms and interactive
                        • Publishing houses – Print and digital
                        • Technical writers

                        Pricing

                        Downloads

                        Blog

                        • Success stories

                        About us

                        • Careers
                        • Partnership

                        Contact Us

                        Contact Sales

                        European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                        • Cookie Policy
                        • Terms of Use
                        • Privacy Policy / GDPR
                        • Student Data Privacy
                        • Compliance
                        • Cookie Settings

                        © Wiris 2026

                        Expand