HotPot record is missing sourcetype

HotPot record is missing sourcetype

by Manga Professor -
Number of replies: 11

Hello everyone,

I've been trying to import a hotpotatoes activity into Moodle 2.2.3 but I keep getting the same message: "HotPot record is missing sourcetype".  I've already ran the following SQL statements on my database (provided by Gordon Bateson, moderator of this forum):

UPDATE mdl_hotpot SET sourcetype='hp_6_jcloze_xml' WHERE sourcefile LIKE '%.jcl.xml';
UPDATE mdl_hotpot SET sourcetype='hp_6_jcross_xml' WHERE sourcefile LIKE '%.jcw.xml';
UPDATE mdl_hotpot SET sourcetype='hp_6_jmatch_xml' WHERE sourcefile LIKE '%.jmt.xml';
UPDATE mdl_hotpot SET sourcetype='hp_6_jmix_xml' WHERE sourcefile LIKE '%.jmx.xml';
UPDATE mdl_hotpot SET sourcetype='hp_6_jquiz_xml' WHERE sourcefile LIKE '%.jqz.xml';

but I got the same error. Before I did that I also tried renaming the file extension to .jcw, .jcl, etc, but it didn't work, either.

Would be very glad if someone here could help me.

Thanks a lot.

Manga

Attachment Captura de Tela 2012-07-02 às 17.50.13.png
Average of ratings: -
In reply to Manga Professor

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello,
this message means that HotPot cannot recognize the file.

It is not enough just to change the file extension. The important point is the format of the data in the file. An ".htm" file should contain only HTML formatted content. A ".jqz" file should contain data formatted by the Hot Potatoes JQuiz program, and so on.

Please could you attach your Hot Potatoes quiz file to your next post to this forum and we can decide together what would be the most approriate file extension to use.

thanks
Gordon

In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Manga Professor -

Hello Gordon,

I was actually just doing an experiment to learn how to import hot potatoes exercises into Moodle (I'm a computer guy, but new to Moodle) and that's when I started having the problem. I created a sample JCross activity, just wrote one word in the crossword grid and exported it as a V6 Standard Page. Then I tried to add it to a topic… and you know the rest.

I've attached the sample JCross activity I created so you can take a look at it.

Thanks.

Manga

In reply to Manga Professor

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Manga,
you can display the "my_test.htm" file through the HotPot module for Moodle 2.x. - no problem there (see screenshot).

However, you were trying to import the JCross question into the Moodle question bank. In which case, you cannot use the htm file. You must use the jcw file that JCross creates on your computer when you do a simple "Save" from JCross.

Please be aware that the standard Moodle question types have no direct equivalent for crosswords, so the JCross questions appear as ordinary short-answer questions after they have been imported into the Moodle question bank.

regards
Gordon

Attachment jcross.my_test.jpg
In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Manga Professor -

Hello Gordon,

I did a "Save" from JCross as you told me, it generated a .jcw file (which I attached to this post), but when I imported it I got the same error. With the same .jcw file I went to Question Bank > Import and tried to import it. Here's what I got:

"Parsing questions from import file.
Error importing question HotPot import class file missing: E:\Domains\ (my domain) \wwwroot\sistema/mod/hotpot/source/hp/6/jcross/xml/class.php
There are no questions in the import file"
 
The file was not empty, as I had written a word in the crossword grid and its clue.

I also tried importing a JQuiz (.jqz) file into a topic, but I got "HotPot record is missing sourcetype" again.

What am I missing?

Thanks.

Manga

In reply to Manga Professor

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Manga,
thanks for supplying the jcw file. The good news is that I was able to import it successfully on my Moodle 2.2 site. (see atttached screenshot)

> a .jcw file ... when I imported it I got the same error

Do you mean you got the error that says "HotPot record is missing source type"? I find that very puzzling because I was able to import the file successfully. Could you tell me the exact sequence of menu options and links that you selected to "import" the file?

> With the same .jcw file I went to Question Bank > Import
> and tried to import it.

OK, that is the method that I used to successfully import the file. Is that a different "import" from the first method you tried?

> Error importing question HotPot import class file missing:
> mod/hotpot/source/hp/6/jcross/xml/class.php

The first thing to do is to check that the "class.php" file exists. If it doesn't exist, you should download and install the latest version of the HotPot module.

If the "class.php" file does exist, you probably need to change the permissions on the file so that the web server can read it.

regards
Gordon

Attachment hotpot.jcross.import.png
In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Manga Professor -

Hi Gordon,

Below are my answers:

> Do you mean you got the error that says "HotPot record is missing source type"?

Yes, that same message.

> I find that very puzzling because I was able to import the file successfully. Could you tell me the exact sequence of menu options and links that you selected to "import" the file?

Logged in as Administrator > turned editing on > chose a topic > clicked on "Add an Activity" > chose Hot Potatoes from the list > attached the file > clicked on "Save and Display" > got the error message

I said:

With the same .jcw file I went to Question Bank > Import
and tried to import it.

> (You repliedsmile OK, that is the method that I used to successfully import the file. Is that a different "import" from the first method you tried?

The first method I tried is the one I described above (i.e. Logged in as Administrator > turned editing on > chose a topic > clicked on "Add an Activity" > chose Hot Potatoes from the list > attached the file > clicked on "Save and Display" > got the error message)

> The first thing to do is to check that the "class.php" file exists. If it doesn't exist, you should download and install the latest version of the HotPot module.
HotPot module for Moodle 2.x

I downloaded it from the exact same link you provided above. The "class.php" file is there, inside the "Moodle" subfolder.

> If the "class.php" file does exist, you probably need to change the permissions on the file so that the web server can read it.

Will talk to my programmer so he can do it, if that is the case.

 

Hope you can help.

Thanks a lot.

Manga

In reply to Manga Professor

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Manga,
we are getting a little confused because we are using the word "import" differently.

There are two ways to administer a Hot Potatoes quiz via Moodle:

  1. create a HotPot activity and use the Hot potatose file as the "Source file" for the HotPot activity
  2. go to the Moodle question bank, click the "Import" link, select "Hot Potatoes XML file", upload the Hot Potatoes file, and click the "import" button. The question(s) can now be added to a Moodle Quiz activity

It seems that you use "import" to talk about both situations. However, when I say "import" I mean only case number (2) above.

I do not use "import" to talk about case (1). Instead, I use a phrase such as "add a HotPot activity".

If the permissions are not allowing the web server to read the PHP scripts, then you will not be able to add a HotPot activity or import a Hot Potatoes file into the question bank.

Once you have verified that the permissions are correct, please try the "import" again and let us know how you get on.

regards
Gordon

In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Manga Professor -

Hello Gordon,

I tried changing the permissions via FTP, but for some reason I don't know (nor does my programmer) the server won't let me do so.

So I called the technical support of the company I hosted my Moodle website with. The guy said I would have to change my plan (which is currently Windows) to Linux hosting so I could change the permissions for php files freely.

Is that right?

Thanks.

Manga

In reply to Manga Professor

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Manga,
> the technical support of the company I hosted my Moodle website with.
> ... said I would have to change my plan ... Is that right?

Actually, no that doesn't sound right to me. The HotPot module doesn't need any fancy permissions. It just needs the same read permissions as all the other Moodle scripts. If you install it the same way that you installed Moodle, i.e. upload it and unzip it OR download it from CVS, then it should just work.

I would like to come and have a look at your server and investigate what is going on. I would welcome the chance to install HotPot for you and get you up and running. Would it be possible to send the server access info to me: gordon at-sign kanazawa hyphen gu dot ac dot jp ?

cheers
Gordon

In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Manga,
thanks for sending the access info to your server. I was able to login and have a good look around. The custom theme is very cool approve

To cut a long story short, the HotPot module is now working on your server. And by the way, the Nanogong module is now working too. The attached screenshot shows the sample HotPot being displayed.

I spent some time trying to find out why those two modules were not working, but in the end the fix was to update both modules to their latest version. In the case of the Nanogong module, I had to completely delete it (Settings -> Plugins -> Activity module -> Manage activity module) and then reinstall it to make sure the Moodle permissions were reset correctly.

I got the "file not found" error message on a number of occasions. On that particular server, I don't think the message actually means "file not found". It seems to be used whenever the server has an error. It occurs more often when the Moodle debugging level (Settings -> Development -> Debugging) is set to "Developer".

Looking at the server info (Settings -> Server -> PHP info), I notice that your server's MySQL version is 5.0.8, when the minimum for Moodle 2.2 is MySQL 5.0.25. I also see that you have 60MB of memmory available to Moodle which is low. The Moodle docs for Moodle 2.2 recommend "at least 40MB (64MB or more recommended if you have a choice)". If you move up to Moodle 2.3, you will need at least 256 MB.

Overall, I would say you server is underpowered for Moodle 2.x, and I recommend you move to different server, or upgrade your current server, so that it can run more comfortably. if it is struggling now, with only you and me on it, I suspect it will grind to a halt when the students start hitting it.

In my experience, Windows servers are more sluggish than the Linux counterparts, so unless you have a strong reason to stick with Windows, I suggest you switch to a Linux host, that has lots of memory.

I made myself an Moodle admin on your site, but please feel free to demote me, or better still delete me altogether.

regards
Gordon

Attachment Screen Shot 2012-07-07 at 8.27.55 PM.png
In reply to Gordon Bateson

Re: HotPot record is missing sourcetype

by Manga Professor -

Gordon,

You're the man! Thank you very much for doing all this.

Although my website is now working, the limitations of my server made me realize that I have to rethink my plans, as I don't want any problems in the future. The first thing that came to my mind is: my server can be anywhere in the world, as long as I can pay by credit card and they can speak either Portuguese, English, Spanish or Italian (in case I have to reach technical support in an emergency). Do you know any good hosting companies that can cover all the technical requirements needed for a good Moodle 2.3 website? I have been struggling with brazilian companies with no success for the past 3 months or so.  

I saw on your profile that you are a CALL researcher in Japan. I have a degree in languages, I'm a language teacher and translator and I am really into computers. I have my own course. I would like to know everything about the latest resources, technologies, tools, websites, courses, webinars, people, etc. anything about CALL you have access to - anything you can share. The reason I'm using Moodle is because I am setting up an online version of my course (as you have probably noticed) so I need to be up to date.

Once again, thank you very much for you help.

Cheers,

Manga