function qformat_gift::escapedchar_post in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/question/format/gift/format.php \qformat_gift::escapedchar_post()
2 calls to qformat_gift::escapedchar_post()
- qformat_gift::commentparser in includes/
moodle/ question/ format/ gift/ format.php - qformat_gift::readquestion in includes/
moodle/ question/ format/ gift/ format.php - Given the data known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.
File
- includes/
moodle/ question/ format/ gift/ format.php, line 95
Class
- qformat_gift
- @package questionbank @subpackage importexport
Code
function escapedchar_post($string) {
//Replaces placeholders with corresponding character AFTER processing is done
$placeholders = array(
"&&058;",
"&&035;",
"&&061;",
"&&123;",
"&&125;",
"&&126;",
"&&010",
);
//dlnsk
$characters = array(
":",
"#",
"=",
"{",
"}",
"~",
"\n",
);
//dlnsk
$string = str_replace($placeholders, $characters, $string);
return $string;
}