{"action":"created","issue":{"url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/245","repository_url":"https://api.github.com/repos/maths/moodle-qtype_stack","labels_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/245/comments","events_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/245/events","html_url":"https://github.com/maths/moodle-qtype_stack/issues/245","id":185462023,"number":245,"title":"significantfigures(a,b) function","user":{"login":"dhilsen","id":22775691,"avatar_url":"https://avatars.githubusercontent.com/u/22775691?v=3","gravatar_id":"","url":"https://api.github.com/users/dhilsen","html_url":"https://github.com/dhilsen","followers_url":"https://api.github.com/users/dhilsen/followers","following_url":"https://api.github.com/users/dhilsen/following{/other_user}","gists_url":"https://api.github.com/users/dhilsen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhilsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhilsen/subscriptions","organizations_url":"https://api.github.com/users/dhilsen/orgs","repos_url":"https://api.github.com/users/dhilsen/repos","events_url":"https://api.github.com/users/dhilsen/events{/privacy}","received_events_url":"https://api.github.com/users/dhilsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-10-26T17:42:21Z","updated_at":"2016-11-17T05:33:21Z","closed_at":null,"body":"With the significant figures tests working so well and able to handle the difficult issue of trailing zeros, it seemed logical to ask if the significantfigures(a,b) function could be made to do the same. I believe this function presently truncates to the specified number of significant digits but does not recognize zeros after the decimal as significant (i.e. with the function set to display 3 significant figures, a value of 1 is displayed as 1 and not 1.00 as would be expected). \n\nHaving this functionality would be extremely important as random variables and the teacher answer would be displayed to the student with the correct number of significant figures.\n"},"comment":{"url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/comments/261159570","html_url":"https://github.com/maths/moodle-qtype_stack/issues/245#issuecomment-261159570","issue_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/245","id":261159570,"user":{"login":"jmbragg","id":4606870,"avatar_url":"https://avatars.githubusercontent.com/u/4606870?v=3","gravatar_id":"","url":"https://api.github.com/users/jmbragg","html_url":"https://github.com/jmbragg","followers_url":"https://api.github.com/users/jmbragg/followers","following_url":"https://api.github.com/users/jmbragg/following{/other_user}","gists_url":"https://api.github.com/users/jmbragg/gists{/gist_id}","starred_url":"https://api.github.com/users/jmbragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmbragg/subscriptions","organizations_url":"https://api.github.com/users/jmbragg/orgs","repos_url":"https://api.github.com/users/jmbragg/repos","events_url":"https://api.github.com/users/jmbragg/events{/privacy}","received_events_url":"https://api.github.com/users/jmbragg/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T05:33:21Z","updated_at":"2016-11-17T05:33:21Z","body":"First, I got my nomenclature wrong.... I was talking about the question tests.  \r\n\r\nI think part of the issue here is I'm still trapped in some old ways of thinking about building questions when Chris and Matti have been quite busy improving the entire system.  For example, I think I first played with this back in the days of `stack_units_split`.  In particular, I don't think I had wrapped my brain around the necessity of the `stackunits()` function.  But I see it now...  Thanks for being so patient with me and explaining.\r\n\r\nMatti, one place that seems odd to me that you would do it that way is `@stackunits(dispsf(a,4),cm)@` in the question text.  It seems far less complicated to just do `@dispsf(a,4)@ @cm@`.   Is there some reason why you suggest your method?\r\n\r\nIn any case, there are now more things that I'm wondering if I'm doing them in the way its intended to do them.  I'm going to apply this new understanding to my next unit's questions in the next few weeks.  I'll post them over on Moodle.org and hopefully one of you all would be willing to do a bit of code review with me.  Hopefully some of the best practices there can migrate their way into a Units question authoring guide similar to the others in the docs.  I'll definitely be willing to help on that front as I have some free time around Christmas."}}
{"actor":{"display_login":"jmbragg"}}