Moodle JavaScript Cookbook by Alastair Hole

By Alastair Hole

Make Moodle e-learning much more dynamic by means of studying to customise utilizing JavaScript. With over 50 recipes, this Cookbook permits you to upload results, adjust varieties, contain animations, and lots more and plenty extra for an better consumer experience.

Overview

  • Learn why, the place, and the way so as to add so as to add JavaScript for your Moodle site
  • Get the main out of Moodle's integrated extra—the Yahoo! consumer Interface Library (YUI)
  • Explore quite a lot of smooth interactive positive aspects, from AJAX to Animation
  • Integrate exterior libraries like jQuery framework with Moodle

What you'll examine from this book

  • Get all started with the Yahoo! consumer Interface Library
  • Add validation positive factors on your Moodle forms
  • Retrieve and method info from exterior websites in a number codecs utilizing AJAX
  • Add function wealthy spreadsheet-style info tables—sorting, paging, and inline editing
  • Add auto-complete performance to textual content bins and blend boxes
  • Make use of complicated navigation controls—drop-down menus, tabbed panels, and modal windows
  • Use animation techniques—fading, scrolling, and resizing
  • Integrate exterior libraries resembling JQuery framework, MooTools framework, and Dojo framework
  • Initialize a YUI DataSource

Approach

This is a cookbook that features a record of recipes explaining step by step find out how to use JavaScript in Moodle. the 1st chapters pay attention to the fundamentals of ways to begin operating with JavaScript and the YUI whereas the later chapters convey how you can use those suggestions as a foundation for imposing extra entire functionality.

Who this ebook is written for

This e-book is aimed toward builders and directors pleased with customizing Moodle with using plugin modules, subject matters, and patches who need to make their web site extra dynamic. in case you have earlier wisdom of HTML, Hypertext Preprocessor, and CSS and an excellent operating wisdom of the underlying constitution of Moodle, then this publication is for you. No earlier event with JavaScript is needed.

In Detail

Moodle is the easiest e-learning answer at the block and is revolutionizing classes on the net. utilizing JavaScript in Moodle is particularly priceless to directors and dynamic builders because it makes use of integrated libraries to supply the fashionable and dynamic event that's anticipated through net clients today.

The Moodle JavaScript Cookbook will take you thru the fundamentals of mixing Moodle with JavaScript and its quite a few libraries and clarify how JavaScript can be utilized besides Moodle. it is going to clarify the right way to combine Yahoo! consumer Interface Library (YUI) with Moodle. YUI often is the major concentration of the publication, and is the most important to imposing glossy, dynamic feature-rich interfaces to assist your clients get a extra gratifying and effective Moodle adventure. it's going to enable you upload results, make kinds extra responsive, use AJAX and animation, all to create a richer person event. it is possible for you to to paintings via quite a number YUI good points, corresponding to pulling in and showing details from different web content, improving present UI parts to make clients' lives more uncomplicated, or even the way to upload animation for your pages for a pleasant completing touch.

Show description

Read or Download Moodle JavaScript Cookbook PDF

Best object-oriented design books

Building Java Enterprise Systems with J2EE

The sensible attitude of establishing Java company platforms with J2EE presents the conceptual historical past and wealth of code examples had to really gather structures in an invaluable demeanour with the J2EE applied sciences. moreover, this ebook demonstrates how the applied sciences supplement and construct on best of each other through evolution of a cohesive and actual pattern program.

Beginning Perl (Expert's Voice in Open Source)

It is a booklet for these people who believed that we didn’t have to study Perl, and now we all know it truly is extra ubiquitous than ever. Perl is very versatile and robust, and it isn’t petrified of internet 2. zero or the cloud. initially touted because the duct tape of the web, Perl has when you consider that developed right into a multipurpose, multiplatform language current totally far and wide: heavy-duty internet functions, the cloud, platforms management, normal language processing, and monetary engineering.

Developing Modular-Oriented Simulation Models Using System Dynamics Libraries (SpringerBriefs in Electrical and Computer Engineering)

This SpringerBrief introduces the advance and sensible software of a module-oriented improvement framework for area particular system-dynamic libraries (SDL approach), that are utilized in the simulation of multi-causal and dynamic relationships on various degrees of an undefined, as an instance the development undefined.

Additional resources for Moodle JavaScript Cookbook

Sample text

Use ( function(Y) { /* */ } ); Note that the use method takes an arbitrarily long number of arguments (one or more) and only the last argument must be the anonymous function described in the previous recipe. The preceding arguments are a list of one or more modules you wish to load. use ( "anim", "event", function(Y) { /* */ } ); 24 Chapter 2 Now all of the features of these two additional modules (anim and event) will be available within the anonymous function that contains the code we want to execute.

Delegate takes four arguments: Description Value The type of event to delegate click The function to register The click handler function The name of the parent element #container li The child elements for the events 35 Moodle and Yahoo! delegate then sets up a click handler for all of the li elements within the #container element, and registers the function that we have passed. Inside this function, the particular element that has fired the event is referred to as "this". In this case, "this" is an

  • object containing the link tag.

    In this example, we are retrieving the language string for course from the core Moodle language file. . str. course. Using this method, the strings we have set up will be available to all subsequent JavaScript code. If we had simply passed this string as a parameter to the JavaScript function, it would only be available inside that function. If we required it to be available within additional functions, we would have to repeat the process, making copies of the string and passing those to the additional functions resulting in unnecessarily inefficient code.

  • Download PDF sample

    Rated 4.76 of 5 – based on 40 votes