Moodle javascript Cookbook by Alastair Hole

By Alastair Hole

Moodle is the simplest e-learning resolution at the block and is revolutionizing classes on the net. utilizing javascript in Moodle is especially worthy to directors and dynamic builders because it makes use of integrated libraries to supply the trendy and dynamic adventure that's anticipated by way of internet clients today.
The Moodle javascript Cookbook will take you thru the fundamentals of mixing Moodle with javascript and its a variety of libraries and clarify how javascript can be utilized besides Moodle. it is going to clarify tips on how to combine Yahoo! person Interface Library (YUI) with Moodle. YUI would be the major concentration of the booklet, and is the major to enforcing sleek, dynamic feature-rich interfaces to aid your clients get a extra pleasant and effective Moodle event. it's going to enable you upload results, make types extra responsive, use AJAX and animation, all to create a richer consumer adventure. it is possible for you to to paintings via quite a number YUI good points, akin to pulling in and showing details from different web pages, bettering latest UI parts to make clients’ lives more straightforward, or even the way to upload animation for your pages for a pleasant completing touch.
A Cookbook jam-packed with step-by-step recipes to reinforce Moodle with javascript and the Yahoo! UI Library
What you are going to study from this publication :
• start with the Yahoo! person Interface Library
• upload validation good points in your Moodle forms
• Retrieve and method information from exterior websites in a variety of codecs utilizing AJAX
• upload characteristic wealthy spreadsheet-style info tables—sorting, paging, and inline editing
• upload auto-complete performance to textual content bins and blend boxes
• utilize complicated navigation controls—drop-down menus, tabbed panels, and modal windows
• Use animation techniques—fading, scrolling, and resizing
• combine exterior libraries reminiscent of JQuery framework, MooTools framework, and Dojo framework
• Initialize a YUI DataSource

Show description

Read Online or Download Moodle javascript Cookbook PDF

Similar object-oriented design books

Pro Active Record: Databases with Ruby and Rails

Seasoned energetic list is helping you are taking good thing about the whole strength of your database engine from inside your Ruby courses and Rails purposes. ActiveRecord, a part of the magic that makes the Rails framework so strong and straightforward to take advantage of, is the version portion of Rails model/view/controller framework. Its an object-relational mapping library permitting you to engage with databases from either Ruby and Rails purposes.

Liferay 6.2 User Interface Development

Liferay employs a really expert theming process for you to switch the appear and feel of the person interfaces. Liferay Portal presents format templates so as to describe how a variety of columns and rows are prepared to demonstrate portlets. It additionally offers issues that may be used to customise the general appear and feel of sites and web content.

Control flow semantics

Keep an eye on circulation Semantics provides a unified, formal remedy of the semantics of a large spectrum of keep watch over move notions as present in sequential, concurrent, common sense, object-oriented, and practical programming languages. while in additional conventional methods one specializes in input/output habit, during this paintings equivalent recognition is dedicated to finite and countless computations, the latter encouraged by means of the starting to be value of reactive structures.

Apache Camel Developer's Cookbook

Apache Camel is a de-facto common for constructing integrations in Java, and relies on well-understood company Integration styles. it truly is used inside of many advertisement and open resource integration items. Camel makes universal integration initiatives effortless whereas nonetheless offering the developer with the potential to customise the framework while the location calls for it.

Extra info for Moodle javascript Cookbook

Example text

In this recipe, we will learn how to attach a click event handler to an HTML input button as per the first example. We will set up the code such that an alert is displayed when the button is clicked. php require_once(dirname(__FILE__) . > 27 Moodle and Yahoo! on("click", btn1_Click, "#btn1"); }); How to do it... php, with the addition of a form with an input button labeled Button 1 with the ID btn1 as seen in the following screenshot: This is the button to which we shall register a click event, referring to it by its ID later on.

Getting ready Please refer to the first recipe in this chapter for details on how to prepare a QuickForm web form which is the basis of this recipe. How to do it... php, just after the field definition: $mform->addElement('text', 'mytext7', 'Letters only'); $mform->addRule('mytext7', 'Letters only', 'lettersonly', null, 'client'); When we test out this rule by entering numeric characters, our warning message is displayed and we are not able to submit the form as seen in the following screenshot: How it works...

50 Chapter 3 Rejecting punctuation characters In this recipe, we will add a rule that prevents the input of punctuation characters. This could be useful, for example, where you require the title of a new document to not contain periods or commas. Getting ready Please refer to the first recipe in this chapter for details on how to prepare a QuickForm web form which is the basis of this recipe. How to do it... php, just after the field definition: $mform->addElement('text', 'mytext10', 'No punctuation'); $mform->addRule('mytext10', 'No punctuation', 'nopunctuation', null, 'client'); When we test this new rule by entering text that includes punctuation characters (a comma or period), we see that the warning message is displayed and we are unable to submit the form as seen in the following screenshot: How it works...

Download PDF sample

Rated 4.97 of 5 – based on 20 votes