summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7a28033)
This may provide insight into the learning process (e.g. after I
reviewed the Git index, everyone started doing better).
# quizzer. If not, see <http://www.gnu.org/licenses/>.
import codecs as _codecs
# quizzer. If not, see <http://www.gnu.org/licenses/>.
import codecs as _codecs
+import datetime as _datetime
import json as _json
from . import __version__
import json as _json
from . import __version__
def add(self, question, answer, correct):
if question.id not in self:
self[question.id] = []
def add(self, question, answer, correct):
if question.id not in self:
self[question.id] = []
+ timezone = _datetime.timezone.utc
+ timestamp = _datetime.datetime.now(tz=timezone).isoformat()
self[question.id].append({
'answer': answer,
'correct': correct,
self[question.id].append({
'answer': answer,
'correct': correct,
+ 'timestamp': timestamp,
})
def get_answered(self, questions):
})
def get_answered(self, questions):