$string['cannotopencsv'] = 'Cannot open csv file';
$string['cannotopenforwrit'] = 'Cannot open for writing: $a';
$string['cannotopenfile'] = 'Cannot open file ($a)';
+$string['cannotopentemplate'] = 'Cannot open template file ($a)';
$string['cannotreadtmpfile'] = 'Error reading temporary file';
$string['cannotreaduploadfile'] = 'Could not read uploaded file';
$string['cannotreadfile'] = 'Can not read file ($a)';
$string['cannotaddquestionrecord'] = 'Could not add question record';
$string['cannotaddresprecord'] = 'Could not add response record';
$string['cannotaddstrrecord'] = 'Could not add string record';
+$string['cannotfindmethod'] = 'Template block expand method not found: ($a)';
$stirng['cannotinsertattempt'] = 'Could not insert attempt record: $a';
$string['cannotupdateattempt'] = 'Could not update attempt record: $a';
$string['checks'] = 'Checks';
$filepath = $this->parent->template_dirpath.DIRECTORY_SEPARATOR.$filename;
// try and open the template file
if (!file_exists($filepath) || !is_readable($filepath)) {
- $msg = 'Could not open the '.$this->parent->template_dir.' template file "'.$filepath.'"';
- print_error($msg, '', $this->parent->course_homeurl);
+ print_error('cannotopentemplate', '', $this->parent->course_homeurl, $filepath);
}
// read in the template and close the file
$this->$tag = file_get_contents($filepath);
$this->$tag = str_replace($blocks[0][$ii], $replace, $this->$tag);
}
} else {
- $msg = 'Template block expand method not found: "'.$method.'"';
- print_error($msg, '', $this->parent->course_homeurl);
+ print_error('cannotfindmethod', 'hotpot', $this->parent->course_homeurl, $method);
}
}
}