CARVIEW |
Moodle JavaScript Cookbook
Formats:

save 15%!
save 44%!

Also available on: |
![]() ![]() ![]() ![]() |
- Learn why, where, and how to add to add JavaScript to your Moodle site
- Get the most out of Moodle's built-in extra—the Yahoo! User Interface Library (YUI)
- Explore a wide range of modern interactive features, from AJAX to Animation
- Integrate external libraries like jQuery framework with Moodle
Book Details
Language : EnglishPaperback : 180 pages [ 235mm x 191mm ]
Release Date : April 2011
ISBN : 184951190X
ISBN 13 : 9781849511902
Author(s) : Alastair Hole
Topics and Technologies : All Books, Cookbooks, e-Learning, Moodle, Open Source
Table of Contents
PrefaceChapter 1: Combining Moodle and JavaScript
Chapter 2: Moodle and Yahoo! User Interface Library (YUI)
Chapter 3: Moodle Forms Validation
Chapter 4: Manipulating Data with YUI 3
Chapter 5: Working with Data Tables
Chapter 6: Enhancing Page Elements
Chapter 7: Advanced Layout Techniques
Chapter 8: Animating Components
Chapter 9: Integrating External Libraries
Index
- Chapter 1: Combining Moodle and JavaScript
- Introduction
- Creating a new Moodle PHP page
- Loading a JavaScript file
- Loading a JavaScript file in <head>
- Generating a JavaScript function call from PHP
- Passing variables from PHP to JavaScript
- Ensuring compliance with XHTML Strict
- Retrieving language strings from Moodle
- Chapter 2: Moodle and Yahoo! User Interface Library (YUI)
- Introduction
- Initializing the YUI 3 library
- Loading additional YUI modules
- Loading YUI 2 modules from YUI 3
- Attaching basic event handlers
- Attaching advanced DOM event handlers
- Implementing event delegation
- Debugging with the YUI console
- Chapter 3: Moodle Forms Validation
- Introduction
- Adding a required field
- Adding a field with a maximum length
- Adding a field with a minimum length
- Adding a field length within in a specified range
- Adding a valid e-mail address field
- Adding custom validation with a Regular Expression
- Adding a field that accepts only alphabetic characters
- Adding a field that accepts only alphanumeric characters
- Adding a field that accepts only numeric characters
- Rejecting punctuation characters
- Rejecting input without a leading zero
- Comparing with another field
- Adding a custom JavaScript validation function callback
- Chapter 4: Manipulating Data with YUI 3
- Introduction
- Using IO to request a URI
- Using IO's alternative transport method for requesting external URIs
- Using PHP as a proxy to load data from an external domain
- Parsing XML with DataSource
- Parsing JSON with DataSource
- Parsing CSV data with DataSource
- Retrieving data from a Moodle 2.0 web service
- Chapter 5: Working with Data Tables
- Introduction
- Initializing a YUI DataSource
- Displaying data
- Basic column sorting
- Adding paging
- Enabling scrolling
- Enabling editing
- Chapter 6: Enhancing Page Elements
- Introduction
- Adding a text box with auto-complete
- Adding a combo box with auto-complete
- Displaying auto-updating data
- Enabling resizable elements
- Adding custom tooltips
- Adding custom button controls
- Chapter 7: Advanced Layout Techniques
- Introduction
- Adding a fly-out navigation menu
- Adding a drop-down navigation menu
- Displaying a tree-view navigation menu
- Adding a tabbed content control
- Displaying content in a modal window
- Chapter 8: Animating Components
- Introduction
- Fading in an element
- Fading out an element
- Scrolling an element
- Resizing an element
- Animating with easing
- Moving an element along a straight path
- Moving an element along a curved path
- Changing an element's color
- Sequencing multiple animations
- Chapter 9: Integrating External Libraries
- Introduction
- Adding the jQuery framework
- Adding the MooTools framework
- Adding the Dojo framework
- Adding the Prototype framework
- Adding the script.aculo.us add-on to Prototype
- Adding image enlargement with Lightbox 2
Alastair Hole
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
What you will learn from this book
- Get started with the Yahoo! User Interface Library
- Add validation features to your Moodle forms
- Retrieve and process data from external sites in a range of formats using AJAX
- Add feature rich spreadsheet-style data tables—sorting, paging, and inline editing
- Add auto-complete functionality to text boxes and combo boxes
- Make use of advanced navigation controls—drop-down menus, tabbed panels, and modal windows
- Use animation techniques—fading, scrolling, and resizing
- Integrate external libraries such as JQuery framework, MooTools framework, and Dojo framework
- Initialize a YUI DataSource
Special Offers

Annual subscription:
$220.00 per annum
Monthly subscription:
$21.99 per month
In Detail
Moodle is the best e-learning solution on the block and is revolutionizing courses on the Web. Using JavaScript in Moodle is very useful to administrators and dynamic developers as it uses built-in libraries to provide the modern and dynamic experience that is expected by web users today.
The Moodle JavaScript Cookbook will take you through the basics of combining Moodle with JavaScript and its various libraries and explain how JavaScript can be used along with Moodle. It will explain how to integrate Yahoo! User Interface Library (YUI) with Moodle. YUI will be the main focus of the book, and is the key to implementing modern, dynamic feature-rich interfaces to help your users get a more satisfying and productive Moodle experience. It will enable you to add effects, make forms more responsive, use AJAX and animation, all to create a richer user experience. You will be able to work through a range of YUI features, such as pulling in and displaying information from other websites, enhancing existing UI elements to make users' lives easier, and even how to add animation to your pages for a nice finishing touch.
A Cookbook filled with step by step recipes to enhance Moodle with JavaScript and the Yahoo! UI Library
Approach
This is a cookbook that contains a list of recipes explaining step-by-step how to use JavaScript in Moodle. The first two chapters concentrate on the basics of how to start working with JavaScript and the YUI while the later chapters show how to use these techniques as a basis for implementing more complete functionality.
Who this book is for
This book is aimed at developers and administrators comfortable with customizing Moodle with the use of plugin modules, themes, and patches who want to make their site more dynamic. If you have prior knowledge of HTML, PHP, and CSS and a good working knowledge of the underlying structure of Moodle, then this book is for you. No prior experience with JavaScript is needed.
Alternative Books
Have a look at these alternative products. Remember that if you buy two eBooks, you get 50% off both.
-
- Learn how Dynamics NAV ERP suite is set up and customized for various industries
- Integrate numerous parts of a company's operations including financial reporting, sales, order management, inventory, and forecasting
- Develop complete applications and not just skeleton systems
- Covers the design and implementation of two new add-on services: The Squash application and the Storage & Logistics application
- Also usable for previous versions such as 3.x, 4.0, and 5.0
- Easy-to-read style, packed with hard-won practical advice
- Real-world examples with step-by-step explanations
-
- Technical foundations of the Documentum platform
- Over 200 practice questions and three practice tests
- Up-to-date information on version 6.5 SP2 including presets, aspects, new Webtop interface, lightweight types, Composer, and DFS
- Over 200 illustrations and many more examples from a real-life business scenario
-
- Easy-to-follow introduction to OGRE 3D
- Create exciting 3D applications using OGRE 3D
- Create your own scenes and monsters, play with the lights and shadows, and learn to use plugins
- Get challenged to be creative and make fun and addictive games on your own
- A hands-on do-it-yourself approach with over 100 examples
-
- Written in an accessible readable style, this practical book will help you to successfully master user authentication, authorization, and user management in Siebel CRM
- Set up the organization and position hierarchy as well as create user accounts in step-by-step examples
- Instructions valid for versions 8.0, 8.1, and 8.2
-
- Optimize time-consuming tasks efficiently using three Oracle database utilities
- Get to grips with user session management issues
- Boost database defences with Oracle Wallet Manager and Security
- A focused handbook with practical content and real-life scenarios
-
- The first book on the newly released Inkscape version 0.48, with an exclusive focus on web design
- Incorporate eye-catching designs, charts, and other visual elements to spice up your web pages
- Learn how to create your own Inkscape templates in addition to using the built-in ones
- Written in a simple illustrative manner, which will appeal to web designers and experienced Inkscape users alike
-
- Focusses on 3 key areas of development with Seam – testing, persistence and security
- Test your site to ensure efficiency
- Learn how to develop persistent applications
- Secure your web application with user authentication and OpenID.
-
- Covers the full spectrum of features offered by the NetBeans IDE
- Discover ready-to-implement solutions for developing desktop and web applications
- Learn how to deploy, debug, and test your software using NetBeans IDE
- Another title in Packt's Cookbook series giving clear, real-world solutions to common practical problems
-
New jQuery Book Released jQuery Tools UI Library will show you how to add useful functionality to your website, using the compact but powerful jQuery Tools library.Get inspiration for developing your own ideas with the book.
Learn More Download a free chapter - Quickly look up features of the jQuery library
- Step through each function, method, and selector expression in the jQuery library with an easy-to-follow approach
- Understand the anatomy of a jQuery script
- Write your own plug-ins using jQuery's powerful plug-in architecture
- Written by the creators of learningquery.com
- Check out the new Learning jQuery Third Edition here
-
- An introduction to jQuery that requires minimal programming experience
- Detailed solutions to specific client-side problems
- For web designers to create interactive elements for their designs
- For developers to create the best user interface for their web applications
- Packed with great examples, code, and clear explanations
- Revised and updated version of the first book to help you learn jQuery
![]() |
RSS Feed |
![]() |
Sign up to Packt's newsletter |
![]() |
Follow Packt at Twitter |
![]() |
Join our Facebook Group |
Customer service body text... insert content here.
Returns Centre body text... insert content here.
Packt Updates
To submit your images Click Here
Click here to view Packt's cookie policy. This explains the cookies on Packt's website, and why we use them. It also explains information on how to manage your cookies.
By closing this banner, you are consenting to our use of cookies on your device, unless you have disabled them in your browser.