Installing Opaque question type in 1.9 Beta+ fails

Installing Opaque question type in 1.9 Beta+ fails

by John Isner -
Number of replies: 18
There were errors in setting up the database tables (see attached screenshot). I upgraded to the latest trunk version of today. I also downloaded opaque.zip from the modules and plugins database today.


Attachment installing_opaque_question_type_failed.png
Average of ratings: -
In reply to John Isner

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's the wreched XMLDB library, that likes adding a DEFAULT '' to the column definiton of NOT NULL columns, even though you didn't ask for it when you created the table definition. I filed this bug: http://tracker.moodle.org/browse/CONTRIB-111
In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by John Isner -
Thanks, Tim. I'll wait for a fix and try again.
In reply to John Isner

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Sorry, I should have added: If you take out the NOTNULL="true" from the definition of column type in table question_opaque_servers in install.xml, then it should install and work just fine.
In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by John Isner -
... after first manually removing the tables created by the failed install?
In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by John Isner -
I had to drop the tables to get the install to complete. Is that a defect in the install script?

I don't have a question engine yet, so I couldn't create an actual opaque question, but here are some trivial problems I noted so far:
  • missing lang string 'addingopaque'
  • missing help file questionengine.html
  • missing help file questionid.html
Now to install STACK.
In reply to John Isner

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
John, it would be helpful if you could file these in the tracker under Project: CONTRIB, Component, Questiontype: Opaque, so I don't forget about them. Thanks.
In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by Steve Turley -

I tried this fix in the 1.95+ version and it still fails for me.  Maybe I didn't understand your fix.  I changed section in question/type/opaque/db/install.xml which used to read:

<TABLE NAME="question_opaque_servers" COMMENT="This table stores the individual servers that make up an Opaque remote engine."  PREVIOUS="question_opaque_engines" NEXT="question_opaque">
  <FIELDS>
    <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false"...

so that it now reads

<TABLE NAME="question_opaque_servers" COMMENT="This table stores the idividual servers that make up an Opaque remote engine."
  <FIELDS>
    <FIELD NAME="id" TYPE="int" LENGTH="10" UNSIGNED="false"...

Do you have another suggestion?  I'd like to give your Opaque type a try.

In reply to Steve Turley

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Dear all, I also meet this problem, as we need to use opaque in the version 1.9. 

Do you have any solution for installing the opaque in Moodle 1.9?

Many thanks !!

In reply to qingyun li

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you insist on using Moodle 1.9, then you are on your own. It is years since I touched that code.

You really need to upgrade to Moodle 2.5. It is so much better.

In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Hi Tim,

Our current system is 1.9 and will be upgraded to 2.5 in the next August.

If we apply the plugin-Opaque in 1.9 now, how can we upgrade the quiz and grades? please kindly advise.

Thanks and regards, rain.

In reply to qingyun li

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't think you can upgrade attempts at Opaque questions from 1.9 to 2.5. (Unless you want to write the necessary upgrade code yourself.)

In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Please help correct me following points about the upgrading from 1.9 to 2.5

1. The Opaque questions in 1.9 can be updated to 2.5.

2. The students' grades of the Opaque questions in 1.9 can be updated to 2.5.

Thanks and regards

In reply to qingyun li

Re: Installing Opaque question type in 1.9 Beta+ fails

by Jean-Michel Védrine -

Hello,

If you have

  1. opaque questions in the question bank
  2. some quiz including opaque questions
  3. students attempts for these quiz

And you upgrade from Moodle 1.9 to Moodle 2.5 (you will need to install the version of Opaque for Moodle 2.5 at the same time you install all the other files of Moodle 2.5)

  1. Your opaque questions in the question bank will be OK and work
  2. Your quiz with opaque questions will be OK and new students attempts made after the upgrade will work
  3. But old students attempts made before the upgrade will be broken and will not work

As Tim said, this is because the code necessary to convert the attempts data has never been written, most probably because people using opaque and upgrading from 1.9 to 2.3/2.4/2.5 didn't need the old attempts data.

 

In reply to Jean-Michel Védrine

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Dear Jean, Many thanks for your kind reply and useful information!

 

In reply to qingyun li

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Dear all,

Please kindly advise whether there is any settings can set the Opaque question type only for some specific teachers, and hidden to other teachers, both in Moodle 1.9 and 2.3.

As we buy the 3rd party service and only want to keep the question type not open to all uses.

Many thanks !!

In reply to qingyun li

Re: Installing Opaque question type in 1.9 Beta+ fails

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

In the admin menu, you can enable or disable question types, but that affects all users. There is no way to set it up differently per-role.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Thanks Tim,

Also, is there any Opaque examples for students to submit an essay to 3rd service provider(by Opaque) and receive/store the score, feedback in Moodle?

Please kindly advise.

In reply to Tim Hunt

Re: Installing Opaque question type in 1.9 Beta+ fails

by qingyun li -

Dear all,

For installing the plugin in Moodle, we find the guide that the Moodle should be turned to 'Debug mode'.

Please help advise whether this can be skipped, since many other plugins and users on the production site.

Thanks and regards, rain.