drop 'extra' from default cloze note type

Too many users get confused about where they should be placing the
cloze deletions.
This commit is contained in:
Damien Elmes 2020-01-03 13:40:50 +10:00
parent ab6247f8d9
commit 253d429a8b
2 changed files with 2 additions and 3 deletions

View file

@ -101,8 +101,6 @@ def addClozeModel(col) -> NoteType:
txt = _("Text")
fm = mm.newField(txt)
mm.addField(m, fm)
fm = mm.newField(_("Extra"))
mm.addField(m, fm)
t = mm.newTemplate(_("Cloze"))
fmt = "{{cloze:%s}}" % txt
m[
@ -116,7 +114,7 @@ def addClozeModel(col) -> NoteType:
color: lightblue;
}"""
t["qfmt"] = fmt
t["afmt"] = fmt + "<br>\n{{%s}}" % _("Extra")
t["afmt"] = fmt
mm.addTemplate(m, t)
mm.add(m)
return m

View file

@ -331,6 +331,7 @@ def test_modelChange():
# back the other way, with deletion of second ord
deck.models.remTemplate(basic, basic["tmpls"][1])
assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 2
map = {0: 0}
deck.models.change(cloze, [f.id], basic, map, map)
assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 1