ResourcePage Problem

ResourcePage Problem

by joe mc-h -
Number of replies: 4

I have installed the ResourcePage Module and patched the relevant files as per README, all the tables have been created correctly etc.. ResourcePage appears in the Resourec menu and when selected I get what appears to be a fully functioning "Adding a new ResourcePage" form. When trying to save changes ("save and display" or "save and return to course") I get a "Could not add a new instance of ResourcePage" error.

I have checked the database and the mdl_resourcepage table is being written to with the info I'm filling in on the form.

I am testing using an Xammp package of 1.9 beta4.

Hope someone can help as I really like the look of this new module

tia Joe

Average of ratings: -
In reply to joe mc-h

Re: ResourcePage Problem

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi, thanks for trying it.

Unfortunately, as noted on the download page for resourcepage, it currently requires the Postgres database, not MySQL. This might cause these problems (and others if you get past that stage). Database table creation is all done using the Moodle cross-platform system but some of the queries use Postgres-specific features (well, mostly SQL standard features, but whatever) that are not supported in MySQL.

I have edited the description to make this clearer. It's in bold now! And in a clear list. (Before it was just one sentence towards the end in normal type, so it was a bit easy to miss.)

We are hoping to enhance resourcepages to also support MySQL, perhaps in the next few months (I can't promise a date! or even that we actually get it done. but it looks hopeful). If using Postgres is not an option for you, then maybe you can try again then. Apologies for the inconvenience.

--sam
In reply to sam marshall

Re: ResourcePage Problem

by joe mc-h -

Hi Sam

Thanks for replying. It's a real shame, I guess the majority of Moodlers use MySQL. I had a quick look and I don't think Postgres would be easy for us to transfer to.

(Has anyone out there transfered from MySQL to Postgres???? Is there major benefits in transfering?)

How much work do you estimate there is in making ResourcePage MySQL compatible?

Many thanks again

Joe

In reply to joe mc-h

Re: ResourcePage Problem

by Anil Sharma -
I wish this was in MySql too, we really need a module like this but can't use Postgres
In reply to Anil Sharma

Re: ResourcePage Problem

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The problem is a few of the SQL statements in the code. Fixing it would involve searching all the resourcepage code for "->do_sql", and checking that the SQL there works in MySQL. There will only be a few that are a problem (unfortunately they will be the most complex), and the first task is to identify them, then the second task is to rewrite them in a database-independent way.