You're looking at an older version of Totara.

Please see Totara 14 help for the latest version.

On this page

Search

There are a number of development tools you can use to fine-tune your Totara experience, including debugging and experimental settings.

You might also find our public developer documentation helpful as it contains a number of useful guides and resources for developers. 

Web service test client

The web service test client executes the functions for real, so you should not test functions that you don't know.

All existing web service functions are not yet implemented into the test client. In order to check that a user cannot access some functions, you can test some functions that you didn't allow. To see clearer error messages set the debugging to NORMAL: Show errors, warnings and notices in Debug messages.

Purge all caches

Purge all caches can be accessed via the Administration block within Site Administration > Development > Purge all caches.

Totara can cache themes, javascript, language strings, filtered text, RSS feeds, and many other pieces of calculated data. Purging these caches will delete that data from the server and force browsers to refetch data, so that you can be sure you are seeing the most up-to-date values produced by the current code. There is no danger in purging caches, but your site may appear slower for a while until the server and clients calculate new information and cache it.

Summary of purge all caches function.

Make test course

This tool creates standard test courses that include many sections, activities, and files. This is intended to provide a standardised measure for checking the reliability and performance of various system components (such as backup and restore).

This test is important because there have been many cases previously where, faced with real-life use cases (e.g. a course with 1,000 activities), the system does not work. Courses created using this feature can occupy a large amount of database and file system space (tens of gigabytes). You will need to delete the courses (and wait for various cleanup runs) to release this space again.

Do not use this feature on a live system. Use only on a developer server. (To avoid accidental use, this feature is disabled unless you have also selected DEVELOPER debugging level.)

Make JMeter test plan

This tool creates a JMeter test plan file along with the user credentials file.

This test plan is designed to work along with https://github.com/moodlehq/moodle-performance-comparison, which makes it easier to run the test plan in a specific Totara environment, gathers information about the runs and compares the results, so you will need to download it and use it's test_runner.sh script or follow the installation and usage instructions.

You need to set a password for the course users in config.php (e.g. $CFG->tool_generator_users_password = 'totara';). There is no default value for this password to prevent unintended usages of the tool. You need to use the update passwords option in case your course users have other passwords or they were generated by tool_generator but without setting a $CFG->tool_generator_users_password value.

It is part of tool_generator so it works well with the courses generated by the courses and the site generators, it can also be used with any course that contains, at least:

  • Enough enrolled users (depends on the test plan size you select) with the password reset to 'totara'
  • A page module instance
  • A forum module instance with at least one discussion and one reply

You might want to consider your servers capacity when running large test plans as the amount to load generated by JMeter can be especially big. The ramp up period has been adjusted according to the number of threads (users) to reduce this kind of issues but the load is still huge.

Do not run the test plan on a live system. This feature only creates the files to feed JMeter so is not dangerous by itself, but you should NEVER run this test plan in a production site.

Other development tools

There is also a range of other tools for developers to utilise including:

  • Third party libraries

  • Acceptance testing

  • PHPUnit tests

  • Template library

  • XMLDB editor

  • Web API

Provide feedback about this page using the link in the bottom right of this page. 

 Still have questions? 

Why not post them in the forums on the Totara Community?



  • No labels