示例#1
0
<?php

echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
?>
<assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd"
	identifier="TEST" title="<?php 
echo StripForTitle($paper->paper_title);
?>
">
	<outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE">
		<defaultValue>
			<value>0</value>
		</defaultValue>
	</outcomeDeclaration>
	<testPart identifier="part01" navigationMode="nonlinear" submissionMode="simultaneous">
<? foreach ($paper->screens as $s_id => $screen) : ?>
	<assessmentSection identifier="section<?php 
echo $s_id;
?>
" title="Screen <?php 
echo $s_id;
?>
" visible="true">
<? foreach ($screen->question_ids as $q_id) : ?>
<? $question = FindQuestion($data->questions, $q_id); ?>
			<assessmentItemRef identifier="item<?php 
echo $question->load_id;
?>
" href="question-<?php 
示例#2
0
 function SaveCalculation(&$question)
 {
     // TODO : NO template
     // format the text for the question
     foreach ($question->variables as $var => $vairable) {
         ${$var} = MathsUtils::gen_random_no(checkVariables($vairable->min), checkVariables($vairable->max), $vairable->inc, $vairable->dec);
     }
     eval("\$answer = " . $question->formula . ";");
     $q_text = $question->leadin;
     $q_text = str_ireplace("\$A", $A, $q_text);
     $q_text = str_ireplace("\$B", $B, $q_text);
     $q_text = str_ireplace("\$C", $C, $q_text);
     $q_text = str_ireplace("\$D", $D, $q_text);
     $q_text = str_ireplace("\$E", $E, $q_text);
     $q_text = str_ireplace("\$F", $F, $q_text);
     $q_text = str_ireplace("\$G", $G, $q_text);
     $q_text = str_ireplace("\$H", $H, $q_text);
     //echo $q_text."<BR>";
     $question->leadin = $q_text;
     $headertext = $this->MakeQuestionHeader($question);
     $title = StripForTitle($question->leadin);
     $ob = new OB();
     $ob->ClearAndSave();
     include "qti20/tmpl/calculation.php";
     $this->output .= $ob->GetContent();
     $ob->Restore();
 }
示例#3
0
    ?>

<?php 
    $qno = 1;
    ?>
	<?php 
    foreach ($result['load']['data']->questions as $question) {
        ?>
		<tr>
			<td></td>
			<td align="right" style="padding-right:6px;"><?php 
        echo $qno;
        ?>
.</td>
			<td width="50%"><?php 
        echo StripForTitle($question->leadin);
        ?>
</td>
			<td><?php 
        echo $question->load_id;
        ?>
</td>
			<td><nobr><?php 
        echo ConvertType($question->type);
        ?>
&nbsp;</nobr></td>
			<td><?php 
        LogForQuestion($question->load_id);
        ?>
</td>
		</tr>	
示例#4
0
			<metadata>
				<imsmd:lom>
					<imsmd:general>
						<imsmd:identifier><?php 
echo $question->load_id;
?>
</imsmd:identifier>
						<imsmd:title>
							<imsmd:langstring xml:lang="en"><?php 
echo StripForTitle($question->leadin);
?>
</imsmd:langstring>
						</imsmd:title>
						<imsmd:description>
							<imsmd:langstring xml:lang="en"><?php 
echo StripForTitle($question->scenario);
?>
</imsmd:langstring>
						</imsmd:description>
					</imsmd:general>
					<imsmd:lifecycle>
						<imsmd:version>
							<imsmd:langstring xml:lang="en">1.0</imsmd:langstring>
						</imsmd:version>
						<imsmd:status>
							<imsmd:source>
								<imsmd:langstring xml:lang="x-none">LOMv1.0</imsmd:langstring>
							</imsmd:source>
							<imsmd:value>
								<imsmd:langstring xml:lang="x-none">Draft</imsmd:langstring>
							</imsmd:value>
示例#5
0
文件: header.php 项目: vinod-co/centa
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rogō.  If not, see <http://www.gnu.org/licenses/>.
$configObject = Config::get_instance();
$cfg_web_root = $configObject->get('cfg_web_root');
?>
	<item title="<?php 
echo StripForTitle($title);
?>
" ident="<?php 
echo $question->load_id;
?>
">
		<itemmetadata>
			<qmd_itemtype><?php 
echo $type;
?>
</qmd_itemtype>
			<qmd_status><?php 
echo $question->status;
?>
</qmd_status>
			<qmd_score_method><?php 
示例#6
0
 function MakeQuestionHeader(&$question, $scenario = true, $image = true)
 {
     $configObject = Config::get_instance();
     $cfg_web_root = $configObject->get('cfg_web_root');
     $output = "";
     if (trim($question->theme)) {
         $output .= "\n\t\t\t<material label='theme'>\n\t\t\t\t<mattext texttype='text/html'><![CDATA[<font size='+2' color='#316ac5'>" . $question->theme . "</font>]]></mattext>\n\t\t\t</material>";
     }
     if (trim($question->notes)) {
         $output .= "\n\t\t\t<material label='notes'>\n\t\t\t\t<matimage imagtype='image/gif' uri='notes_icon.gif'/>\n\t\t\t\t<mattext texttype='text/html'><![CDATA[<font color='#c00000'> <b>NOTE:</b> " . $question->notes . "</font>]]></mattext>\n\t\t\t</material>";
         if (!file_exists($this->params->base_dir . '/' . $this->params->dir . "/" . 'notes_icon.gif')) {
             copy($cfg_web_root . 'artwork/notes_icon.gif', $this->params->base_dir . '/' . $this->params->dir . "/" . 'notes_icon.gif');
         }
         $this->data->files[] = new ST_File('notes_icon.gif', 'notes_icon.gif', $this->params->dir, 'image');
     }
     if ($scenario && !empty($question->scenario) && strlen(trim($question->scenario)) > 0) {
         $output .= "\n\t\t\t<material label='scenario'>\n\t\t\t\t<mattext texttype='text/html'><![CDATA[" . $question->scenario . "]]></mattext>\n\t\t\t</material>";
     }
     if ($image && !empty($question->media)) {
         $output .= "\n\t\t\t<material label='media'>\n\t\t\t\t<matimage imagtype='" . $question->media_type . "' uri='" . $question->media . "'/>\n\t\t\t</material>";
     }
     if (trim($question->leadin)) {
         $output .= "\n\t\t\t<material label='leadin'>\n\t\t\t\t<mattext texttype='text/html'><![CDATA[" . $question->leadin . "]]></mattext>\n\t\t\t</material>";
     }
     $title = $question->leadin;
     if ($output == "") {
         $output = "<p></p>";
     }
     $title = StripForTitle($title);
     return array($output, $title);
 }
示例#7
0
?>
<assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd"
	identifier="TEST" title="<?php 
echo StripForTitle($data->questions[0]->leadin);
?>
">
	<outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE">
		<defaultValue>
			<value>0</value>
		</defaultValue>
	</outcomeDeclaration>
	<testPart identifier="part01" navigationMode="nonlinear" submissionMode="simultaneous">
		<assessmentSection identifier="section" title="<?php 
echo StripForTitle($data->questions[0]->leadin);
?>
" visible="true">
<? foreach ($data->questions as $question) : ?>
			<assessmentItemRef identifier="item<?php 
echo $question->load_id;
?>
" href="question-<?php 
echo $question->load_id;
?>
.xml"/>
<? endforeach; ?>
		</assessmentSection>
	</testPart>
	<outcomeProcessing>
		<setOutcomeValue identifier="SCORE">