This repository was archived by the owner on Jun 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1206,13 +1206,18 @@ def practice():
12061206 # present the next one in the list after the last one that was asked
12071207 question = questions [(qIndex + 1 ) % len (questions )]
12081208
1209- # This replacement is to render images
1210- question .htmlsrc = question .htmlsrc .replace (
1211- 'src="../_static/' , 'src="' + get_course_url ("_static/" )
1212- )
1213- question .htmlsrc = question .htmlsrc .replace (
1214- "../_images/" , get_course_url ("_images/" )
1215- )
1209+ if question .htmlsrc :
1210+ # This replacement is to render images
1211+ question .htmlsrc = question .htmlsrc .replace (
1212+ 'src="../_static/' , 'src="' + get_course_url ("_static/" )
1213+ )
1214+ question .htmlsrc = question .htmlsrc .replace (
1215+ "../_images/" , get_course_url ("_images/" )
1216+ )
1217+ else :
1218+ logger .error (
1219+ f"NO HTML SOURCE for question { question .id } , { question .name } sid: { auth .user .username } "
1220+ )
12161221
12171222 autogradable = 1
12181223 # If it is possible to autograde it:
You can’t perform that action at this time.
0 commit comments