Book Image

Drupal for Education and E-Learning

Book Image

Drupal for Education and E-Learning

Overview of this book

Table of Contents (22 chapters)
Drupal for Education and E-Learning
Credits
About the Author
About the Reviewers
Preface
Index

Using Code Snippets to Track Student Progress


Code snippets are small chunks of PHP code that can be embedded in a page. Using PHP snippets offers a great deal of flexibility, but they should also be used with extreme care. To start, the right to embed PHP snippets should only be given to trusted users who actually know PHP. A poorly-formed PHP snippet has the potential to bring down a site; a malicious user with the rights to use PHP snippets can also wreak havoc. However, when used appropriately, PHP snippets are a powerful tool.

Enabling PHP Snippets

To enable selected users to embed PHP snippets, we first need to enable the PHP filter module. To enable this module, click the Administer | Site building | Modules link, or navigate to admin/build/modules. In the Core – optional section, enable the PHP filter module. Click the Save configuration button to save the changes.

Then, click the Administer | Site configuration | Input formats link, or navigate to admin/settings/filters.

Note

Configuring...