$grouparray[] =& $mform->createElement('text', 'conditionfieldvalue');
$mform->setType('conditionfieldvalue', PARAM_RAW);
$mform->addElement('hidden', 'course', 0);
$mform->setType('course', PARAM_INT);
$mform->addElement('hidden', 'coursemodule', 0);
$mform->setType('coursemodule', PARAM_INT);
$mform->addElement('hidden', 'section', 0);
$mform->setType('section', PARAM_INT);
$mform->addElement('hidden', 'module', 0);
$mform->setType('module', PARAM_INT);
$mform->addElement('hidden', 'modulename', '');
$mform->setType('modulename', PARAM_PLUGIN);
$mform->addElement('editor', 'introeditor', $label, null, array('maxfiles'=>EDITOR_UNLIMITED_FILES, 'noclean'=>true, 'context'=>$this->context));
$mform->setType('introeditor', PARAM_RAW); // no XSS prevention here, users must be trusted
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->setType('buttonar', PARAM_RAW);
*/
public function testNumberSetType()
$value = new Zend_Measure_Number('-100',Zend_Measure_Number::STANDARD,'de');
$value->setType(Zend_Measure_Number::BINARY);
$this->assertEquals(Zend_Measure_Number::BINARY, $value->getType(), 'Zend_Measure_Number type expected');
$value->setType(Zend_Measure_Number::ROMAN);
$value = new Zend_Measure_Number('1001020',Zend_Measure_Number::BINARY,'de');
$value->setType(Zend_Measure_Number::HEXADECIMAL);
$value = new Zend_Measure_Number('MCXVII',Zend_Measure_Number::ROMAN,'de');
$value->setType(Zend_Measure_Number::HEXADECIMAL);
$value = new Zend_Measure_Number('102122',Zend_Measure_Number::TERNARY,'de');
$value->setType(Zend_Measure_Number::OCTAL);
$value = new Zend_Measure_Number('1032402',Zend_Measure_Number::QUATERNARY,'de');
$value->setType(Zend_Measure_Number::QUINARY);
$value = new Zend_Measure_Number('1052402',Zend_Measure_Number::QUINARY,'de');
$value->setType(Zend_Measure_Number::QUATERNARY);
<?php endif; ?>
<?php $_from = $this->_tpl_vars['BLOCKS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?>
<?php $_from = $this->_tpl_vars['row']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<td height="250" bgcolor="#FFFFFF" valign="top" class="MatrixLayer2">
<?php $_from = $this->_tpl_vars['BLOCKS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?>
<?php $_from = $this->_tpl_vars['row']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</table>
<?php $_from = $this->_tpl_vars['BLOCKS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?>
<?php $_from = $this->_tpl_vars['row']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
<?php $_from = $this->_tpl_vars['elements']['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<select class="small" id="inventory_currency" name="inventory_currency" onchange="updatePrices();">
<?php $_from = $this->_tpl_vars['CURRENCIES_LIST']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php $_from = $this->_tpl_vars['ASSOCIATEDPRODUCTS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['outer1'] = array('total' => count($_from), 'iteration' => 0);
<?php $_from = $this->_tpl_vars['data']['taxes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php $_from = $this->_tpl_vars['FINAL']['taxes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['group_tax_loop'] = array('total' => count($_from), 'iteration' => 0);
<?php $_from = $this->_tpl_vars['FINAL']['sh_taxes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sh_loop'] = array('total' => count($_from), 'iteration' => 0);
<?php $_from = $this->_tpl_vars['ASSOCIATEDPRODUCTS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<!-- This is added to call the function calcCurrentTax which will calculate the tax amount from percentage -->
<?php $_from = $this->_tpl_vars['data']['taxes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</td>
<?php $_from = $this->_tpl_vars['HOME_STUFF']['Header']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php if (count($this->_tpl_vars['HOME_STUFF']['Entries']) > 0): ?>
<?php $_from = $this->_tpl_vars['HOME_STUFF']['Entries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</td>
<?php $_from = $this->_tpl_vars['row']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<td width=5%> </td>
<?php $_from = $this->_tpl_vars['HOME_STUFF']['Details']['Header']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php if (count($this->_tpl_vars['HOME_STUFF']['Details']['Entries']) > 0): ?>
<?php $_from = $this->_tpl_vars['HOME_STUFF']['Details']['Entries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</td>
<?php $_from = $this->_tpl_vars['row']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<table border=0 cellspacing=0 cellpadding=2 width=100%>
<?php $_from = $this->_tpl_vars['HOME_STUFF']['Entries']['Details']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<!-- module loops-->
<?php $_from = $this->_tpl_vars['TAB_PRIV']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php endif; ?>
<?php $_from = $this->_tpl_vars['FIELD_PRIVILEGES'][$this->_tpl_vars['tabid']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['row_values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</tr>
<?php $_from = $this->_tpl_vars['FIELD_PRIVILEGES'][16]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['row_values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php endif; ?>
<?php $_from = $this->_tpl_vars['UTILITIES_PRIV'][$this->_tpl_vars['tabid']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['util_value']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<!-- module loops-->
<?php $_from = $this->_tpl_vars['TAB_PRIV']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php endif; ?>
<?php $_from = $this->_tpl_vars['FIELD_PRIVILEGES'][$this->_tpl_vars['tabid']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['row_values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</tr>
<?php $_from = $this->_tpl_vars['FIELD_PRIVILEGES'][16]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['row_values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php endif; ?>
<?php $_from = $this->_tpl_vars['UTILITIES_PRIV'][$this->_tpl_vars['tabid']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<tr>
<?php $_from = $this->_tpl_vars['util_value']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<table class="drop_down" border="0" cellpadding="5" cellspacing="1" width="100%">
<?php $_from = $this->_tpl_vars['ALL_FOLDERS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php $_from = $this->_tpl_vars['FOLDERS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
");'></td>
<?php $_from = $this->_tpl_vars['folder']['header']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['listviewforeach'] = array('total' => count($_from), 'iteration' => 0);
<?php $_from = $this->_tpl_vars['folder']['entries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
")'></td>
<?php $_from = $this->_tpl_vars['entity']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?>
<?php $_from = $this->_tpl_vars['recordid']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<table class="drop_down" border=0 cellpadding=5 cellspacing=0 width=100%>
<?php $_from = $this->_tpl_vars['EMPTY_FOLDERS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
$mform->addElement('text', "number[{$j}]", $name);
$mform->setType("number[{$j}]", PARAM_RAW); // This parameter will be validated in validation().
$mform->addElement('hidden', "definition[{$j}]");
$mform->setType("definition[{$j}]", PARAM_RAW);
$mform->addElement('hidden', "itemid[{$j}]");
$mform->setType("itemid[{$j}]", PARAM_RAW);
$mform->addElement('static', "divider[{$j}]", '', '<hr />');
$mform->setType("divider[{$j}]", PARAM_RAW);
$mform->addElement('hidden', 'tolerance['.$key.']', '');
$mform->setType('tolerance['.$key.']', PARAM_RAW);
}
$mform->setType("number[{$j}]", PARAM_RAW); // This parameter will be validated in validation().
$mform->addElement('hidden', "itemid[{$j}]");
$mform->setType("itemid[{$j}]", PARAM_INT);
$mform->addElement('hidden', "definition[{$j}]");
$mform->setType("definition[{$j}]", PARAM_NOTAGS);
*/
public function testNumberSetType()
$value = new Zend_Measure_Number('-100',Zend_Measure_Number::STANDARD,'de');
$value->setType(Zend_Measure_Number::BINARY);
$this->assertEquals(Zend_Measure_Number::BINARY, $value->getType(), 'Zend_Measure_Number type expected');
$value->setType(Zend_Measure_Number::ROMAN);
$value = new Zend_Measure_Number('1001020',Zend_Measure_Number::BINARY,'de');
$value->setType(Zend_Measure_Number::HEXADECIMAL);
$value = new Zend_Measure_Number('MCXVII',Zend_Measure_Number::ROMAN,'de');
$value->setType(Zend_Measure_Number::HEXADECIMAL);
$value = new Zend_Measure_Number('102122',Zend_Measure_Number::TERNARY,'de');
$value->setType(Zend_Measure_Number::OCTAL);
$value = new Zend_Measure_Number('1032402',Zend_Measure_Number::QUATERNARY,'de');
$value->setType(Zend_Measure_Number::QUINARY);
$value = new Zend_Measure_Number('1052402',Zend_Measure_Number::QUINARY,'de');
$value->setType(Zend_Measure_Number::QUATERNARY);
<?php if (isset ( $this->_tpl_vars['cats'] )): ?>
<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<div class ="filtr">
<?php $_from = $this->_tpl_vars['tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</b>
<?php $_from = $this->_tpl_vars['item']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<li class ="current"><?php echo $this->_tpl_vars['titem']['title']; ?>
<?php if (isset ( $this->_tpl_vars['titem']['items'] )): ?><?php $_from = $this->_tpl_vars['titem']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?><ul><b><?php echo $this->_tpl_vars['ttitem']['title']; ?>
</b>\<?php $_from = $this->_tpl_vars['ttitem']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<div style = "width: 100%; height: auto;">
<?php $_from = $this->_tpl_vars['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php if (! empty ( $this->_tpl_vars['tags_current'] )): ?>&tags=<?php echo $this->_tpl_vars['tags_current_request']; ?>
<?php endif; ?>">← ??????????</a> | <?php endif; ?><?php $_from = $this->_tpl_vars['pages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php if (isset ( $this->_tpl_vars['cats'] )): ?>
<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<div class ="filtr">
<?php $_from = $this->_tpl_vars['tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
</b>
<?php $_from = $this->_tpl_vars['item']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<li class ="current"><?php echo $this->_tpl_vars['titem']['title']; ?>
<?php if (isset ( $this->_tpl_vars['titem']['items'] )): ?><?php $_from = $this->_tpl_vars['titem']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
?><ul><b><?php echo $this->_tpl_vars['ttitem']['title']; ?>
</b>\<?php $_from = $this->_tpl_vars['ttitem']['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<div style = "width: 100%; height: auto;">
<?php $_from = $this->_tpl_vars['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
<?php if (! empty ( $this->_tpl_vars['tags_current'] )): ?>&tags=<?php echo $this->_tpl_vars['tags_current_request']; ?>
<?php endif; ?>">← ??????????</a> | <?php endif; ?><?php $_from = $this->_tpl_vars['pages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'inpopup');
$mform->setType('inpopup', PARAM_INT);
$mform->addElement('hidden', 'cmid');
$mform->setType('cmid', PARAM_INT);
$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);
$mform->addElement('hidden', 'returnurl');
$mform->setType('returnurl', PARAM_LOCALURL);
$mform->addElement('hidden', 'appendqnumstring');
$mform->setType('appendqnumstring', PARAM_ALPHA);
array('size' => 50, 'maxlength' => 255));
$mform->setType('name', PARAM_TEXT);
array('rows' => 15), $this->editoroptions);
$mform->setType('questiontext', PARAM_RAW);
$mform->addElement('text', "number[$j]", $name);
$mform->setType("number[$j]", PARAM_RAW); // This parameter will be validated in validation().
$mform->addElement('hidden', "definition[$j]");
$mform->setType("definition[$j]", PARAM_RAW);
$mform->addElement('hidden', "itemid[$j]");
$mform->setType("itemid[$j]", PARAM_RAW);
$mform->addElement('static', "divider[$j]", '', '<hr />');
$mform->setType("divider[$j]", PARAM_RAW);
$mform->addElement('hidden', 'tolerance['.$key.']', '');
$mform->setType('tolerance['.$key.']', PARAM_RAW);
$mform->addElement('hidden', 'tolerancetype['.$key.']', '');
$mform->setType('tolerancetype['.$key.']', PARAM_RAW);
}
$mform->setType("number[$j]", PARAM_RAW); // This parameter will be validated in validation().
$mform->addElement('hidden', "itemid[$j]");
$mform->setType("itemid[$j]", PARAM_INT);
$mform->addElement('hidden', 'width');
$mform->setType('width', PARAM_INT);
$mform->addElement('hidden', 'height');
$mform->setType('height', PARAM_INT);
$mform->addElement('hidden', 'bgcolor');
$mform->setType('bgcolor', PARAM_TEXT);
$mform->addElement('hidden', 'mediawidth');
$mform->setType('mediawidth', PARAM_INT);
} else {
$mform->setType('name', PARAM_CLEANHTML);
$mform->setDefault('maxanswers', $CFG->lesson_maxanswers);
$mform->setType('maxanswers', PARAM_INT);
$mform->setDefault('maxtime', 20);
$mform->setType('maxtime', PARAM_INT);
$mform->setDefault('password', '');
$mform->setType('password', PARAM_RAW);
$mform->addElement('hidden', 'completionunlocked', 0);
$mform->setType('completionunlocked', PARAM_INT);
$mform->addElement('hidden', 'instance', 0);
$mform->setType('instance', PARAM_INT);
$mform->addElement('hidden', 'add', 0);
$mform->setType('add', PARAM_ALPHA);
$mform->addElement('hidden', 'update', 0);
$mform->setType('update', PARAM_INT);
$mform->addElement('hidden', 'return', 0);
$mform->setType('return', PARAM_BOOL);
$mform->addElement('hidden', 'sr', 0);
$mform->setType('sr', PARAM_INT);
'noclean' => true, 'context' => $this->context, 'subdirs' => true));
$mform->setType('introeditor', PARAM_RAW); // no XSS prevention here, users must be trusted
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->setType('buttonar', PARAM_RAW);
$mform->addElement('editor', 'description', get_string('userdescription'), null, $editoroptions);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"');
$mform->setType('url', PARAM_URL);
$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"');
$mform->setType('idnumber', PARAM_NOTAGS);
$mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="25"');
$mform->setType('institution', PARAM_TEXT);
$mform->addElement('text', 'department', get_string('department'), 'maxlength="255" size="25"');
$mform->setType('department', PARAM_TEXT);
$mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_NOTAGS);
$mform->addElement('text', 'phone2', get_string('phone2'), 'maxlength="20" size="25"');
$mform->setType('phone2', PARAM_NOTAGS);
$mform->addElement('text', 'address', get_string('address'), 'maxlength="255" size="25"');
$mform->setType('address', PARAM_TEXT);
$mform->addElement('text', 'subject', get_string('subject', 'forum'), 'size="48"');
$mform->setType('subject', PARAM_TEXT);
$mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30));
$mform->setType('message', PARAM_RAW);
$mform->addElement('hidden', 'subscribe');
$mform->setType('subscribe', PARAM_INT);
$mform->addElement('hidden', 'subscribe');
$mform->setType('subscribe', PARAM_INT);
$mform->addElement('hidden', 'timestart');
$mform->setType('timestart', PARAM_INT);
$mform->addElement('hidden', 'timeend');
$mform->setType('timeend', PARAM_INT);
$mform->addElement('hidden', 'course');
$mform->setType('course', PARAM_INT);
$mform->addElement('hidden', 'reply');
$mform->setType('reply', PARAM_INT);