Attachments

Activity

This is related to calculated question type that extends dataset_dependent_questiontype but that is also considered as a numerical question. So calculated has a virtual->qtype that is numerical.
This new string is related to the work done to change all error() messages to print_error().
So in datasetdependent/abstractqtype
the default create_virtual_qtype() gives the error message
function create_virtual_qtype()

{
print_error("novirtualquestion", 'question', '', $this->name());
}

function get_virtual_qtype() {
if (!$this->virtualqtype)

{
$this->virtualqtype = $this->create_virtual_qtype();
}

return $this->virtualqtype;
}
but in calculated/questiontype.php the qtype is created

Pierre Pichet
added a comment - 01/Jun/08 11:22 AM This is related to calculated question type that extends dataset_dependent_questiontype but that is also considered as a numerical question. So calculated has a virtual->qtype that is numerical.
This new string is related to the work done to change all error() messages to print_error().
So in datasetdependent/abstractqtype
the default create_virtual_qtype() gives the error message
function create_virtual_qtype()
{
print_error("novirtualquestion", 'question', '', $this->name());
}
function get_virtual_qtype() {
if (!$this->virtualqtype)
{
$this->virtualqtype = $this->create_virtual_qtype();
}
return $this->virtualqtype;
}
but in calculated/questiontype.php the qtype is created
function create_virtual_qtype()
{
global $CFG;
require_once("$CFG->dirroot/question/type/numerical/questiontype.php");
return new question_numerical_qtype();
}