Develop new section to show external information

Develop new section to show external information

by Gaston M -
Number of replies: 4

We are finding the best way to develop a new section where moodle shows external information about students (for example historical billing information). This information is on an external system (different database).

Should we send this external information for web services to insert it in moodle database (inserting in new tables in moodle)?

After that should we develop an block to show this information in moodle?

If you know similar examples please send us.

Thanks a lot for the help.

Best Regards.

Average of ratings: -
In reply to Gaston M

Re: Develop new section to show external information

by Sebastian Schedlbauer -

Do you mean by "section" a course section? If not, a block would be the easiest option to show some external data.

Depending on your external data, there would be several approaches to gather the data. Using webservices, communictating directly with the database, or as you mentioned also inserting the data into new tables.

As it seems you want to show individual-related information, so this might increase traffic and load, since you cannot simply cache the whole block data. So new tables which are filled by a cronjob for example sound reasonable for me. Or you try to move displaying of information onto the external system (if it has also a webserver), and then just use the block to display the data using an Iframe or CORS/JSONP.

Average of ratings: Useful (1)
In reply to Sebastian Schedlbauer

Re: Develop new section to show external information

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Following Sebastian's suggestion of using a block, you could accompany this with a custom theme that allows blocks in the centre section either above or below the main content. That would give the appearance of being a new 'section' either before or below the existing sections.

R

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Develop new section to show external information

by Gaston M -

Thanks Richard, I will consider using a new theme too.

Best Regards,

Gaston.

In reply to Sebastian Schedlbauer

Re: Develop new section to show external information

by Gaston M -

Thanks a lot Sebastian.

To insert in new tables with a cronjob is very reasonable for me.

I will research how to develop a new block.


Best Regards,

Gaston.