# -*- coding: utf-8 -*-
# $Id: SQL.py 1634 2013-04-12 15:36:36Z amelung $
#
# Copyright (c) 2012 Otto-von-Guericke-Universität Magdeburg
#
# This file is part of ECSpooler.
import tempfile
import logging
#from os.path import join, dirname
#from types import StringType, UnicodeType
# local imports
#from lib.util.BackendSchema import RepeatField
# input schema
'forceCheckForWrongRows',
'for students information about wrong rows only, has no influence on the result.',
),
'nonSelectStatements',
),
'noTypeCheck',
),
'compareDatabases',
'use result sets for comparison.',
),
'databaseCreationQueries',
description = 'Enter one or more SQL statements (exclude select statements) to create the initial database.',
),
'teacherQueries',
description = 'Enter SQL statements which prepare the expected results. To compare "result sets" you need to add a select statement at the end. ',
),
))
# testSchema
'simple',
),
))
"""
Reads all options out of checkboxes.
"""
return "%s%s%s%s" % (checkOnlyForDatabase, nonSelectStatements, noTypeCheck, forceCheckForWrongRows)
"""
"""
return 1
else:
return 0
"""
Backend for checking SQL assignments.
"""
"""
This constructor is needed to reset the logging environment.
"""
"""
@return: a BackendResult object with result code and value
"""
# test for available test specs
msg = 'No test specification selected.'
# get submission
# get other input fields from teacher
# define return values
# run selected test specifications
# get the sql.bat
# write submitted content to files
# script for database creation
execFile = 'SQLAssessment.Main'
# execute wrapper code in interpreter
try:
except Exception, e:
msg = 'Internal error during SQL tests: %s: %s' % \
# an error occured
break
else:
#end out for loop