missing SQL Prototype

missing SQL Prototype

de firat batmaz -
Número de respuestas: 4

Dear All, 

I am planning to use SQL question type  for my database module.  

However I cannot find Prototype SQL.

can you please direct me to a link I can download the XML file from . 

Regards,

En respuesta a firat batmaz

Re: missing SQL Prototype

de Richard Lobb -

Hi Firat

The SQL prototype is now one of the built-in prototypes. It should appear in the usual Question type dropdown list as just sql when you create a new CodeRunner question. There are a couple of example questions in the Samples folder in the CodeRunner repository on GitHub. Just import the Moodle XML file sqlexamples.xml.

If you don't see it as a built-in, you must be using an older version of CodeRunner. I recommend upgrading to the latest version. However, if you don't wish to do that you can manually extract the prototype from the xml file of built-in prototypes here and then import just that prototype by itself. Do not attempt to import the entire file of built-in prototypes as it stands or you'll get duplicate prototypes and chaos will ensue.

Please be aware that the SQL question type isn't something I've used much myself as I don't teach SQL; you will probably need to tailor it to your own needs.

Richard

En respuesta a Richard Lobb

Re: missing SQL Prototype

de firat batmaz -

Hi Richard,

Thank you very much for your reply.  

>>If you don't see it as a built-in, you must be using an older version of CodeRunner. 

Yes, I must have an older version. I will ask the IT Service to install the new version of it . I presume they will do next academic year (September,2019) .   

>>you can manually extract the prototype from the xml file of built-in prototypes here and then import just that >>prototype by itself.

I have imported it. I have the SQL prototype now. Sample questions are opening now  but they give the errors below. 

    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'sqlite3'

Traceback (most recent call last):

  File "prog.python3", line 38, in <module>
    raise Exception("sqlite3 error: " + str(e))
Exception: sqlite3 error: [Errno 2] No such file or directory: 'sqlite3'
I presume I should ask IT Service to create a sqlite3 folder ?


>>Please be aware that the SQL question type isn't something I've used much myself as I don't teach SQL; you will >>>probably need to tailor it to your own needs.

I will do so. I am planning to upload my SQL questions to CodeRunner site.  

thanks again

Regards,

Firat

Marcas:
En respuesta a firat batmaz

Re: missing SQL Prototype

de Richard Lobb -

If you check out the documentation for the question, which you can see by opening the Question Type Details panel in the question authoring view, you'll see it says you need to have sqlite3 installed on your Jobe server. The Jobe installation instructions now include sqlite3 in the list of dependencies but your Jobe is presumably an older version, like your CodeRunner. Sorry - I probably should have warned you about this.

Again, updating to the latest Jobe server would be a good idea but alternatively you can install sqlite3 on Jobe with the command

sudo apt-get install sqlite3

Note that because sql questions require that you include an sqlite3 database file as a support file in each question, you will also need to have a working sqlite3 on your own machine.

Richard