Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 9068285

Browse files
committed
Fixed add_practice_items for Python 3.x
1 parent c366912 commit 9068285

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

controllers/admin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ def add_practice_items():
432432
course = db(db.courses.course_name == auth.user.course_name).select().first()
433433
data = json.loads(request.vars.data)
434434

435-
string_data = [x.encode('UTF8') for x in data]
435+
# Was for Python 2.x
436+
# string_data = [x.encode('UTF8') for x in data]
437+
# Is for Python 3.x
438+
string_data = data
436439

437440
now = datetime.datetime.utcnow()
438441
now_local = now - datetime.timedelta(hours=float(session.timezoneoffset))

0 commit comments

Comments
 (0)