diff --git a/rating/rate_ajax.php b/rating/rate_ajax.php
index <HASH>..<HASH> 100644
--- a/rating/rate_ajax.php
+++ b/rating/rate_ajax.php
@@ -25,6 +25,8 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+define('AJAX_SCRIPT', true);
+
 require_once('../config.php');
 require_once('lib.php');
rating MDL-<I> marking rate_ajax.php as being an ajax so the response should hopefully always be in json