{{ :logo-apl.png?nolink |}} ===== Remote content block ===== * **Component Type :** Block * **Name:** Remote Content * **Family:** Content * **Versions:** 1.9, 2.2 to :M39: * **Distribution :** Public * **Disponibilité :** Stable ==== Description ==== The Remote Content Block (and probably "customlabeltype_remote_content" brother plugin, will offer a unified, generic and multimode way of fetchig external content to add within a moodle page from any web site or remote web app having a web service API. This allows to provide customers with solutions of mashing integration with no further development at all, for most of the additional externally generated content a moodle page might need. Typical application : When course syllabus are generated in other part of the IS, syllabus might be printed as part of a moodle course content with direct reference to the syllabus view generator. The content will in any case fetched through an ajax call to allow the curent moodle page to display integrally even if the remote content are broken or not available. ==== Plugin goals ==== * Grab any externally generated content and help integrating in the moodle inerface * Solve the most usual content retrieval methods so no further nor specific developement will be needed * Be flexible sufficient to receive content and publish all or only part of it * Be powerfull enough to help integrators to layout and tune the output for a smooth integration * Allow sufficient query dynamic paramerization to avoid the "one instance one content" caveheat. * Take care of the performance and take into account the content provisonning delay ==== Features ==== * Supported protocols : * Generic Rest : invokes a rest call through a basic CUrl * Generic SOAP : invokes a Soap server using standard Soap libraries * Moodle WS : Builds a rest or soap call with specific moodle aware settings * raw HTML Capture : Makes a Curl call to a web page and cuts some valuable content in it. * Typical content reception formats : We expect in all cases (except aw html capture) receiving "json", "xml", or "plain" responses. * plain : the direct result of the call is printed in the content container. * json : the data is chery-picked into the response object using a configurable "mustache" template * xml : not defined yet. * Final tuning of the content The configuration will allow entering a local additional CSS that may help visually cleaning or modifying visual formatting of the content. ==== Html raw capture ==== In this mode, we get a remote plain stream and cut the content between a start and an ending detector. ==== Experimental Features ==== The capture mode based on start and end patterns assume there are such recognizable patterns in the received content flow. This is not always tivial. We will examine how to use a Dom parser to extract a portion of content based on a XPath identifier that would be more flexible to cut an interesting content sequence. ==== Dynamic remote queries ==== In some cases, (still in study) we will allow internal dynamic values injection in the remote queries (such as username, user id o idnumber, course idnumber or shortname, etc... in general any available contextual available data that might be usefull to divert the remote server reponse) [[:plugins|Back to plugin index]] - [[:start|Back to home]]