18 require_once SQ_CORE_PACKAGE_PATH.
'/folder/folder.inc';
46 $this->_ser_attrs = TRUE;
62 protected function _getName($short_name=FALSE, $contextid=NULL)
65 if ($contextid === NULL) {
66 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
70 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName(
'name', $this->
type(), Array($this->
id), $contextid);
71 if (empty($values) === TRUE) {
72 return parent::_getName($short_name, $contextid);
74 return $values[$this->id];
89 $page_links = parent::_getAllowedLinks();
90 $page_links[SQ_LINK_TYPE_2][
'online_quiz_question'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
91 $page_links[SQ_LINK_TYPE_3][
'online_quiz_question'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
92 $page_links[SQ_LINK_TYPE_2][
'online_quiz_question_group'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
93 $page_links[SQ_LINK_TYPE_3][
'online_quiz_question_group'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
107 $questions = $GLOBALS[
'SQ_SYSTEM']->am->getChildren($this->
id,
'online_quiz_question', FALSE);
122 return $this->
attr(
'score_categories');
137 $score_category = NULL;
140 foreach ($score_categories as $key => $current_score_category) {
141 $min_score = $current_score_category[
'min_score'];
142 $max_score = $current_score_category[
'max_score'];
149 if ((strlen($min_score) == 0) && (strlen($max_score) > 0) && ($score <= $max_score)) {
150 $score_category = $current_score_category;
154 if ((strlen($min_score) > 0) && (strlen($max_score) > 0) && ($score >= $min_score) && ($score <= $max_score)) {
155 $score_category = $current_score_category;
159 if ((strlen($min_score) > 0) && (strlen($max_score) == 0) && ($score >= $min_score)) {
160 $score_category = $current_score_category;
165 return $score_category;