Remove BadMethodCallException when creating quiz with no answer and zero

Authored by Harjotsingh on Jul 15 2017, 5:09 AM.

Description

Remove BadMethodCallException when creating quiz with no answer and zero

The quiz throws BadMethodCallException when no answer is provided or zero
is provided as answer, earlier it just showed syntax error.
This change creates templateParser before the if/else block and removes legacy
method empty.Added two tests one for empty value for question inside quiz and other
when 0 is answer.

Bug: T170733
Change-Id: I6a1fcf8a3707305dd8d41d93c4597950ba537fb4

Details

Committed
HarjotsinghJul 16 2017, 2:30 PM
Parents
rEQUI7f5d3f2c2cec: Basic Unit Tests for Quiz Extension
Branches
Unknown
Tags
Unknown
References
refs/changes/37/365437/5
ChangeId
I6a1fcf8a3707305dd8d41d93c4597950ba537fb4