also look for pix/id.{jpg, png} and video/id.webm

This commit is contained in:
Frank Becker 2010-12-21 13:32:54 +01:00
parent 6695717385
commit 0310ad9924
10 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,7 @@ The
line has to be in there. The file has to stop with such a line.
"""
import os
import csv
import json
@ -43,8 +44,13 @@ class Question(object):
{'text': val} if num +1 != int(arg[6]) \
else {'text': val, 'right': 'true'} \
for num, val in enumerate(arg[2:6])
]
]
if os.path.isfile("pix/{0}.png".format(arg[7])):
self.data['image'] = "pix/{0}.png".format(arg[7])
if os.path.isfile("pix/{0}.jpg".format(arg[7])):
self.data['image'] = "pix/{0}.jpg".format(arg[7])
if os.path.isfile("video/{0}.webm".format(arg[7])):
self.data['video'] = "video/{0}.webm".format(arg[7])
def get_points(self):
"""docstring for get_points"""

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 229 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB