Dataform not saving a value of '0'

Dataform not saving a value of '0'

by Rachel Martin -
Number of replies: 1

Now, I am using dataform for Moodle 2.7, but I have some radio buttons where the selection is 1 or 0.  It shows up fine when making the selection, but when a student selects the radio for 0, it doesn't seem to get saved.  As far as I can see, it doesn't even create an entry in the database for it.

Has anyone else seen this problem?  I'm trying to use dataform for a skills testing sheet and for some skills you are either awarded 1 point or 0 points.  Since there are only 2 options, the radio button worked perfectly, but it seems to think my 0 is a null or nonexistent value when it creates the record.

Average of ratings: -
In reply to Rachel Martin

Re: Dataform not saving a value of '0'

by Itamar Tzadok -

Indeed in 2.7 the select and radio field do not store the value 0 and for calculation purposes no value is considered 0. This was fixed for 2.8.5 and 2.9. smile