O'Reilly logo

Drupal for Education and E-Learning - Second Edition by Bill Fitzgerald, James R. Robertson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, the 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 on the Modules link or navigate to admin/modules. In the Core section, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required