add c<n> for conditional generation of specific clozes

This commit is contained in:
Damien Elmes 2012-04-25 11:11:21 +09:00
parent b3ff6044c8
commit 5f7c80a2cd

View file

@ -476,6 +476,7 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
else:
template = model['tmpls'][0]
fields['Card'] = template['name']
fields['c%d' % (data[4]+1)] = "1"
# render q & a
d = dict(id=data[0])
for (type, format) in (("q", template['qfmt']), ("a", template['afmt'])):