mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
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:
parent
ab6247f8d9
commit
253d429a8b
2 changed files with 2 additions and 3 deletions
|
@ -101,8 +101,6 @@ def addClozeModel(col) -> NoteType:
|
||||||
txt = _("Text")
|
txt = _("Text")
|
||||||
fm = mm.newField(txt)
|
fm = mm.newField(txt)
|
||||||
mm.addField(m, fm)
|
mm.addField(m, fm)
|
||||||
fm = mm.newField(_("Extra"))
|
|
||||||
mm.addField(m, fm)
|
|
||||||
t = mm.newTemplate(_("Cloze"))
|
t = mm.newTemplate(_("Cloze"))
|
||||||
fmt = "{{cloze:%s}}" % txt
|
fmt = "{{cloze:%s}}" % txt
|
||||||
m[
|
m[
|
||||||
|
@ -116,7 +114,7 @@ def addClozeModel(col) -> NoteType:
|
||||||
color: lightblue;
|
color: lightblue;
|
||||||
}"""
|
}"""
|
||||||
t["qfmt"] = fmt
|
t["qfmt"] = fmt
|
||||||
t["afmt"] = fmt + "<br>\n{{%s}}" % _("Extra")
|
t["afmt"] = fmt
|
||||||
mm.addTemplate(m, t)
|
mm.addTemplate(m, t)
|
||||||
mm.add(m)
|
mm.add(m)
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -331,6 +331,7 @@ def test_modelChange():
|
||||||
# back the other way, with deletion of second ord
|
# back the other way, with deletion of second ord
|
||||||
deck.models.remTemplate(basic, basic["tmpls"][1])
|
deck.models.remTemplate(basic, basic["tmpls"][1])
|
||||||
assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 2
|
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)
|
deck.models.change(cloze, [f.id], basic, map, map)
|
||||||
assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 1
|
assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue