Allow quiz titles in validation

This commit is contained in:
Aaron O'Mullan
2014-10-13 15:55:59 +02:00
parent 676b2287ee
commit 84d7662fd8
+6 -1
View File
@@ -68,7 +68,12 @@ function splitQuestions(nodes) {
function isQuiz(nodes) {
// Extract potential questions
var questions = splitQuestions(nodes);
var questions = splitQuestions(
// Skip quiz title if there
nodes.slice(
(nodes[0] && nodes[0].type) === 'paragraph' ? 1 : 0
)
);
// Nothing that looks like questions
if(questions.length === 0) {