* K_PATH_URL_CACHE can't be mapped in Moodle as datadir should not be
* accessible directly. However, it doesn't seem to be used within the
* library code.
+ * K_IMAGES_PATH set to Moodle dirroot
*/
if (empty($CFG)) {
}
}
- // Automatic calculation for the following K_PATH_MAIN constant
- $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen("config"))));
- if (substr($k_path_main, -1) != '/') {
- $k_path_main .= '/';
- }
+ //// Automatic calculation for the following K_PATH_MAIN constant
+ //$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen("config"))));
+ //if (substr($k_path_main, -1) != '/') {
+ // $k_path_main .= '/';
+ //}
/**
* Installation path (/var/www/tcpdf/).
//define ("K_PATH_MAIN", $k_path_main);
define ('K_PATH_MAIN', $CFG->dirroot.'/lib/tcpdf/');
- // Automatic calculation for the following K_PATH_URL constant
- if (isset($_SERVER["HTTP_HOST"]) AND (!empty($_SERVER["HTTP_HOST"]))) {
- if(isset($_SERVER["HTTPS"]) AND (!empty($_SERVER["HTTPS"])) AND strtolower($_SERVER['HTTPS'])!='off') {
- $k_path_url = "https://";
- } else {
- $k_path_url = "http://";
- }
- $k_path_url .= $_SERVER["HTTP_HOST"];
- $k_path_url .= str_replace( '\\', '/', substr($_SERVER["PHP_SELF"], 0, -24));
- }
+ //// Automatic calculation for the following K_PATH_URL constant
+ //if (isset($_SERVER["HTTP_HOST"]) AND (!empty($_SERVER["HTTP_HOST"]))) {
+ // if(isset($_SERVER["HTTPS"]) AND (!empty($_SERVER["HTTPS"])) AND strtolower($_SERVER['HTTPS'])!='off') {
+ // $k_path_url = "https://";
+ // } else {
+ // $k_path_url = "http://";
+ // }
+ // $k_path_url .= $_SERVER["HTTP_HOST"];
+ // $k_path_url .= str_replace( '\\', '/', substr($_SERVER["PHP_SELF"], 0, -24));
+ //}
/**
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
/**
*images directory
*/
- define ("K_PATH_IMAGES", K_PATH_MAIN."images/");
+ //define ("K_PATH_IMAGES", K_PATH_MAIN."images/");
+ define("K_PATH_IMAGES", $CFG->dirroot.'/');
/**
* blank image
*/
- define ("K_BLANK_IMAGE", K_PATH_IMAGES."_blank.png");
+ //define ("K_BLANK_IMAGE", K_PATH_IMAGES."_blank.png");
+ define ("K_BLANK_IMAGE", K_PATH_MAIN."images/_blank.png");
/**
* page format