Split a database template over several pages

Split a database template over several pages

by Alan Coats -
Number of replies: 7

Hi

I have a single database template someone created which is VERY long. We would like to split it so it appears over several screens/pages. There is most likely a simple way of achieving this but I cannot find out how.

Is this actually possible and if so, how.

Average of ratings: -
In reply to Alan Coats

Re: Split a database template over several pages

by Itamar Tzadok -

One relatively simple way is to divide the template to collapsible sections with a bit of html + css + js. There are plenty of examples to google (e.g. http://stackoverflow.com/questions/17460116/expand-and-collapse-a-div-using-javascript). This will show a list of section headings and the user will be able to expand/collapse each section by clicking on the respective heading. hth smile

In reply to Itamar Tzadok

Re: Split a database template over several pages

by Alan Coats -

I appreciate what your are saying and is a simple jquery operation however it introduces more javascript which I am trying to avoid because of performance issues at the user end. 

In reply to Alan Coats

Re: Split a database template over several pages

by Itamar Tzadok -

Afaict, there is no other way with the Database module. The Dataform module allows you to create multiple views of the same entry, but that's a different module. smile

In reply to Itamar Tzadok

Re: Split a database template over several pages

by Alan Coats -

Hi Itamar.

Thanks for the info. I suppose the reason why I could not find how to do it was because you can't sad

I will have a look at the dataform module (I notice it is one of your modules big grin )

In reply to Alan Coats

Re: Split a database template over several pages

by Itamar Tzadok -

Yes. I used to be a heavy user of the Database module until it became clear that it would be much more effective to channel the effort from working around constraints of the module to working out a more flexible flavor of it. smile

In reply to Itamar Tzadok

Re: Split a database template over several pages

by Alan Coats -

Question Itamar, can the data from an existing database module be transferred to the datafrom module ?

 

In reply to Alan Coats

Re: Split a database template over several pages

by Itamar Tzadok -

By export from the database activity and import into a dataform activity. You will need to build the dataform structure from scratch as there is no migration script from a database to a dataform (at least no public script that I'm aware of).

You also need to export the user username (available in Moodle 2.6; not sure about earlier versions) so that importing into the Dataform could associate the imported entries with their original owners (Dataform 2.6 onward).

smile