本文整理汇总了PHP中assQuestion::QTIMaterialToString方法的典型用法代码示例。如果您正苦于以下问题:PHP assQuestion::QTIMaterialToString方法的具体用法?PHP assQuestion::QTIMaterialToString怎么用?PHP assQuestion::QTIMaterialToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assQuestion
的用法示例。
在下文中一共展示了assQuestion::QTIMaterialToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFeedbackGeneric
function getFeedbackGeneric($item)
{
$feedbacksgeneric = array();
foreach ($item->resprocessing as $resprocessing) {
foreach ($resprocessing->respcondition as $respcondition) {
foreach ($respcondition->displayfeedback as $feedbackpointer) {
if (strlen($feedbackpointer->getLinkrefid())) {
foreach ($item->itemfeedback as $ifb) {
if (strcmp($ifb->getIdent(), "response_allcorrect") == 0) {
// found a feedback for the identifier
if (count($ifb->material)) {
foreach ($ifb->material as $material) {
$feedbacksgeneric[1] = $material;
}
}
if (count($ifb->flow_mat) > 0) {
foreach ($ifb->flow_mat as $fmat) {
if (count($fmat->material)) {
foreach ($fmat->material as $material) {
$feedbacksgeneric[1] = $material;
}
}
}
}
} else {
if (strcmp($ifb->getIdent(), "response_onenotcorrect") == 0) {
// found a feedback for the identifier
if (count($ifb->material)) {
foreach ($ifb->material as $material) {
$feedbacksgeneric[0] = $material;
}
}
if (count($ifb->flow_mat) > 0) {
foreach ($ifb->flow_mat as $fmat) {
if (count($fmat->material)) {
foreach ($fmat->material as $material) {
$feedbacksgeneric[0] = $material;
}
}
}
}
}
}
}
}
}
}
}
// handle the import of media objects in XHTML code
foreach ($feedbacksgeneric as $correctness => $material) {
$m = $this->object->QTIMaterialToString($material);
$feedbacksgeneric[$correctness] = $m;
}
return $feedbacksgeneric;
}