本文整理汇总了PHP中assQuestion::isAdditionalContentEditingModePageObject方法的典型用法代码示例。如果您正苦于以下问题:PHP assQuestion::isAdditionalContentEditingModePageObject方法的具体用法?PHP assQuestion::isAdditionalContentEditingModePageObject怎么用?PHP assQuestion::isAdditionalContentEditingModePageObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assQuestion
的用法示例。
在下文中一共展示了assQuestion::isAdditionalContentEditingModePageObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fillRow
/**
* renders a table row by filling wor data to table row template
*
* @access public
* @global ilCtrl $ilCtrl
* @global ilLanguage $lng
* @param array $rowData
*/
public function fillRow($rowData)
{
global $ilCtrl, $lng;
if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) {
$list = new ilAdvancedSelectionListGUI();
$list->setListTitle($lng->txt('actions'));
$list->setId("advsl_hint_{$rowData['hint_id']}_actions");
if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
$editPointsHref = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintGUI', ilAssQuestionHintGUI::CMD_SHOW_FORM);
$editPointsHref = ilUtil::appendUrlParameterString($editPointsHref, "hint_id={$rowData['hint_id']}", true);
$list->addItem($lng->txt('tst_question_hints_table_link_edit_hint_points'), '', $editPointsHref);
$editPageHref = $ilCtrl->getLinkTargetByClass('ilasshintpagegui', 'edit');
$editPageHref = ilUtil::appendUrlParameterString($editPageHref, "hint_id={$rowData['hint_id']}", true);
$list->addItem($lng->txt('tst_question_hints_table_link_edit_hint_page'), '', $editPageHref);
} else {
$editHref = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintGUI', ilAssQuestionHintGUI::CMD_SHOW_FORM);
$editHref = ilUtil::appendUrlParameterString($editHref, "hint_id={$rowData['hint_id']}", true);
$list->addItem($lng->txt('tst_question_hints_table_link_edit_hint'), '', $editHref);
}
$deleteHref = $ilCtrl->getLinkTarget($this->parent_obj, ilAssQuestionHintsGUI::CMD_CONFIRM_DELETE);
$deleteHref = ilUtil::appendUrlParameterString($deleteHref, "hint_id={$rowData['hint_id']}", true);
$list->addItem($lng->txt('tst_question_hints_table_link_delete_hint'), '', $deleteHref);
$this->tpl->setVariable('ACTIONS', $list->getHTML());
$this->tpl->setVariable('HINT_ID', $rowData['hint_id']);
$hintIndex = $rowData['hint_index'] * self::INDEX_TO_POSITION_FACTOR;
} else {
$showHref = $this->parent_obj->getHintPresentationLinkTarget($rowData['hint_id']);
$this->tpl->setVariable('HINT_HREF', $showHref);
$hintIndex = ilAssQuestionHint::getHintIndexLabel($lng, $rowData['hint_index']);
}
$this->tpl->setVariable('HINT_INDEX', $hintIndex);
$this->tpl->setVariable('HINT_TEXT', $rowData['hint_text']);
$this->tpl->setVariable('HINT_POINTS', $rowData['hint_points']);
}
示例2: importGenericFeedback
/**
* imports the given feedback content as generic feedback for the given question id
* for either the complete or incomplete solution
*
* @access public
* @param integer $questionId
* @param boolean $solutionCompleted
* @param string $feedbackContent
*/
public function importGenericFeedback($questionId, $solutionCompleted, $feedbackContent)
{
if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
$pageObjectId = $this->getGenericFeedbackPageObjectId($questionId, $solutionCompleted);
$pageObjectType = $this->getGenericFeedbackPageObjectType();
$this->createPageObject($pageObjectType, $pageObjectId, $feedbackContent);
} else {
$this->saveGenericFeedbackContent($questionId, $solutionCompleted, $feedbackContent);
}
}
示例3: isSyncAfterSaveRequired
/**
* returns the fact wether the presentation of the question sync2pool form
* is required after saving the form or not
*
* @access private
* @return boolean $isSyncAfterSaveRequired
*/
private function isSyncAfterSaveRequired()
{
global $ilUser;
if (!$_GET["calling_test"]) {
return false;
}
if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
return false;
}
if (!$this->questionOBJ->_questionExistsInPool($this->questionOBJ->original_id)) {
return false;
}
if (!assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
return false;
}
return true;
}