if ($values === null){
$values = array(0, 1);
}
-
+
if (!is_null($attributes['group'])) {
-
+
$this->_group = 'checkboxgroup' . $attributes['group'];
unset($attributes['group']);
if (is_null($attributes)) {
$attributes = array();
- $attributes['class'] .= " $this->_group";
+ $attributes['class'] .= " $this->_group";
} elseif (is_array($attributes)) {
if (isset($attributes['class'])) {
$attributes['class'] .= " $this->_group";
} else {
- $attributes['class'] = $this->_group;
+ $attributes['class'] = $this->_group;
}
} elseif ($strpos = stripos($attributes, 'class="')) {
$attributes = str_ireplace('class="', 'class="' . $this->_group . ' ', $attributes);
} else {
$attributes .= ' class="' . $this->_group . '"';
- }
- }
-
+ }
+ }
+
parent::HTML_QuickForm_advcheckbox($elementName, $elementLabel, $text, $attributes, $values);
} //end constructor
} //end func getFrozenHtml
}
-?>
\ No newline at end of file
}
}
} //end class MoodleQuickForm_button
-?>
}
return parent::onQuickFormEvent($event, $arg, $caller);
} // end func onQuickFormEvent
-
+
function getFrozenHtml(){
return HTML_QuickForm_submit::getFrozenHtml();
}
-
+
function freeze(){
return HTML_QuickForm_submit::freeze();
}
// }}}
} //end class MoodleQuickForm_cancel
-?>
\ No newline at end of file
return $output;
} //end func getFrozenHtml
}
-?>
\ No newline at end of file
-<?php //$Id$
+<?php
global $CFG;
require_once "$CFG->libdir/form/group.php";
} // end func onQuickFormEvent
}
-?>
-<?php //$Id$
+<?php
global $CFG;
require_once "$CFG->libdir/form/group.php";
} // end func onQuickFormEvent
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
// }}}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
// }}}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
global $CFG;
return "<a href=\"$CFG->wwwroot/help.php?module=$module&file=$page.html\">$linktext</a>";
}
-
-?>
}
}
-?>
\ No newline at end of file
}
}
}
-?>
\ No newline at end of file
<?php
-// $Id$
require_once 'HTML/QuickForm/header.php';
return $this->_helpbutton;
}
} //end class MoodleQuickForm_header
-?>
return '';
}
}
-?>
\ No newline at end of file
return $html . $this->_getPersistantData();
} //end func getFrozenHtml
}
-?>
class MoodleQuickForm_modgrade extends MoodleQuickForm_select{
var $_hidenograde = false;
-
+
/**
* Class constructor
*
}
}
-?>
\ No newline at end of file
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
-?>
\ No newline at end of file
return $this->_helpbutton;
}
}
-?>
\ No newline at end of file
function MoodleQuickForm_passwordunmask($elementName=null, $elementLabel=null, $attributes=null) {
parent::MoodleQuickForm_password($elementName, $elementLabel, $attributes);
}
-
+
function toHtml() {
global $PAGE;
if ($this->_flagFrozen) {
} //end func toHtml
}
-?>
\ No newline at end of file
}
}
-?>
\ No newline at end of file
return '<span>' . parent::toHtml() . '</span>';
}
}
-?>
\ No newline at end of file
* @var string
*/
var $_helpbutton='';
-
+
var $_https=false;
/**
}
$error = $attributes['error_message'];
unset($attributes['error_message']);
-
+
$strincorrectpleasetryagain = get_string('incorrectpleasetryagain', 'auth');
$strenterthewordsabove = get_string('enterthewordsabove', 'auth');
$strenterthenumbersyouhear = get_string('enterthenumbersyouhear', 'auth');
<div><a href="javascript:Recaptcha.reload()">' . $strgetanothercaptcha . '</a></div>
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type(\'audio\')">' . $strgetanaudiocaptcha . '</a></div>
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type(\'image\')">' . $strgetanimagecaptcha . '</a></div>
-</div>';
+</div>';
return $html . recaptcha_get_html($CFG->recaptchapublickey, $error, $this->_https);
}
-
+
/**
* set html for help button
*
}
$this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
-
+
/**
* get html for help button
*
return true;
}
}
-
-?>
* @access public
*/
class MoodleQuickForm_selectgroups extends HTML_QuickForm_element {
-
+
// {{{ properties
/** add choose option */
* @access private
*/
var $_optGroups = array();
-
+
/**
* Default values of the SELECT
- *
+ *
* @var string
* @since 1.0
* @access private
*/
var $_helpbutton='';
var $_hiddenLabel=false;
-
+
/**
* Class constructor
- *
+ *
* @param string Select name attribute
* @param mixed Label(s) for the select
* @param mixed Data to be used to populate options
* @param mixed An array whose keys are labels for optgroups and whose values are arrays similar to those passed
- * to the select element with keys that are values for options and values are strings for display.
+ * to the select element with keys that are values for options and values are strings for display.
* @param mixed Either a typical HTML attribute string or an associative array
* @param bool add standard moodle "Choose..." option as first item
* @since 1.0
$this->loadArrayOptGroups($optgrps);
}
} //end constructor
-
+
// }}}
// {{{ apiVersion()
/**
* Sets the default values of the select box
- *
+ *
* @param mixed $values Array or comma delimited string of selected values
* @since 1.0
* @access public
$this->_values = array($values);
}
} //end func setSelected
-
+
// }}}
// {{{ getSelected()
/**
* Returns an array of the selected values
- *
+ *
* @since 1.0
* @access public
* @return array of selected values
/**
* Sets the input field name
- *
+ *
* @param string $name Input field name attribute
* @since 1.0
* @access public
{
$this->updateAttributes(array('name' => $name));
} //end func setName
-
+
// }}}
// {{{ getName()
/**
* Returns the element name
- *
+ *
* @since 1.0
* @access public
* @return string
/**
* Returns the element name (possibly with brackets appended)
- *
+ *
* @since 1.0
* @access public
* @return string
/**
* Returns an array of the selected values
- *
+ *
* @since 1.0
* @access public
* @return array of selected values
/**
* Sets the select field size, only applies to 'multiple' selects
- *
+ *
* @param int $size Size of select field
* @since 1.0
* @access public
{
$this->updateAttributes(array('size' => $size));
} //end func setSize
-
+
// }}}
// {{{ getSize()
/**
* Returns the select field size
- *
+ *
* @since 1.0
* @access public
* @return int
/**
* Sets the select mutiple attribute
- *
+ *
* @param bool $multiple Whether the select supports multi-selections
* @since 1.2
* @access public
$this->removeAttribute('multiple');
}
} //end func setMultiple
-
+
// }}}
// {{{ getMultiple()
/**
* Returns the select mutiple attribute
- *
+ *
* @since 1.2
* @access public
* @return bool true if multiple select, false otherwise
/**
* Loads the options from an associative array
- *
+ *
* @param array $arr Associative array of options
* @param mixed $values (optional) Array or comma delimited string of selected values
* @since 1.0
$this->addOptGroup($key, $val);
}
return true;
- }
+ }
/**
* Adds a new OPTION to the SELECT
*
* @param string $text Display text for the OPTION
* @param string $value Value for the OPTION
- * @param mixed $attributes Either a typical HTML attribute string
+ * @param mixed $attributes Either a typical HTML attribute string
* or an associative array
* @since 1.0
* @access public
$index = count($this->_optGroups);
$this->_optGroups[$index] = array('attr' => $attributes);
$this->loadArrayOptions($index, $value);
- }
-
+ }
+
/**
* Loads the options from an associative array
- *
+ *
* @param array $arr Associative array of options
* @param mixed $values (optional) Array or comma delimited string of selected values
* @since 1.0
$this->addOption($optgroup, $val, $key);
}
return true;
- }
+ }
/**
* Adds a new OPTION to an optgroup
*
* @param string $text Display text for the OPTION
* @param string $value Value for the OPTION
- * @param mixed $attributes Either a typical HTML attribute string
+ * @param mixed $attributes Either a typical HTML attribute string
* or an associative array
* @since 1.0
* @access public
$this->_updateAttrArray($attributes, array('value' => $value));
}
$this->_optGroups[$optgroup]['options'][] = array('text' => $text, 'attr' => $attributes);
- }
+ }
/**
* Returns the SELECT in HTML
return $strHtml . $tabs . '</select>';
}
} //end func toHtml
-
+
// }}}
// {{{ getFrozenHtml()
/**
* Returns the value of field without HTML tags
- *
+ *
* @since 1.0
* @access public
* @return string
return $this->_prepareValue($cleanValue, $assoc);
}
}
-
+
// }}}
// {{{ onQuickFormEvent()
} else {
return 'default';
}
- }
+ }
}
-?>
}
}
-?>
\ No newline at end of file
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
$this->assertEqual($el->exportValue(array('testel' => array('number' => 20, 'timeunit' => 1, 'enabled' => 1))), array('testel' => 20));
}
}
-?>
return $this->_elementTemplateType;
}
}
-?>
\ No newline at end of file
return 'default';
}
}
-
+
function freeze(){
$this->_flagFrozen = true;
}
-
+
}
-?>
\ No newline at end of file
function MoodleQuickForm_submitlink($elementName=null, $value=null, $attributes=null) {
parent::MoodleQuickForm_submit($elementName, $value, $attributes);
}
-
+
function toHtml() {
$text = $this->_attributes['value'];
$onmouseover = "window.status=\'" . $text . "\';";
- $onmouseout = "window.status=\'\';";
+ $onmouseout = "window.status=\'\';";
- return "<noscript>" . parent::toHtml() . '</noscript><script type="text/javascript">' . $this->_js . "\n"
- . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '" onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '">'
+ return "<noscript>" . parent::toHtml() . '</noscript><script type="text/javascript">' . $this->_js . "\n"
+ . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '" onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '">'
. $text . "</a>');\n</script>";
}
}
-?>
return array($this->getName() => $tags);
}
}
-?>
}
}
}
-?>
\ No newline at end of file
parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
repository_head_setup();
}
-
+
function setHiddenLabel($hiddenLabel){
$this->_hiddenLabel = $hiddenLabel;
}
parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
repository_head_setup();
}
-
+
function setHiddenLabel($hiddenLabel){
$this->_hiddenLabel = $hiddenLabel;
}
return $this->_elementTemplateType;
}
}
-?>
$completion->inform_grade_changed($cm, $this->grade_item, $this, $deleted);
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
global $DB;
if ($datas = $DB->get_records_select($table, $wheresql, $params)) {
-
+
$result = array();
foreach($datas as $data) {
$instance = new $classname();
return $result;
} else {
-
+
return false;
}
}
}
/**
- * Called immediately after the object data has been inserted, updated, or
- * deleted in the database. Default does nothing, can be overridden to
+ * Called immediately after the object data has been inserted, updated, or
+ * deleted in the database. Default does nothing, can be overridden to
* hook in special behaviour.
*
* @param bool $deleted
function notify_changed($deleted) {
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $retval;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return false;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $grade->rawgrade;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
$this->assertEqual(count($this->grade_outcomes), count($grade_outcomes));
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
$this->assertEqual(preg_replace('/\s*,\s*/', ',', $this->scale[0]->scale), $scale->scale);
}
}
-?>
*/
//public abstract function valid();
-}
\ No newline at end of file
+}
* @return array of file infos
*/
public abstract function list_files($archivefile);
-}
\ No newline at end of file
+}
return get_string('exportingcontentfrom', 'portfolio', $this->display_name() . ': ' . $this->cm->name);
}
}
-
-?>
*/
define('PORTFOLIO_ADD_TEXT_LINK', 4);
-
-?>
* exception for interacting with the button class
*/
class portfolio_button_exception extends portfolio_exception {}
-?>
* it's commented out in portfolio_supported_formats so cannot currently be used.
*/
class portfolio_format_mbkp extends portfolio_format_rich {}
-
-
-?>
$this->add_action_buttons(true, get_string('next'));
}
}
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
define ('XMLDB_LINEFEED', "\n");
define ('XMLDB_PHP_HEADER', ' if ($result && $oldversion < XXXXXXXXXX) {' . XMLDB_LINEFEED);
define ('XMLDB_PHP_FOOTER', ' }' . XMLDB_LINEFEED);
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
/// Deprecated API ends here
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
/// Deprecated API ends here
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
/// Deprecated API ends here
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
/**
* This function will perform the central debug of all the XMLDB classes
- * being called automatically every time one error is found. Apart from
+ * being called automatically every time one error is found. Apart from
* the main actions performed in it (XMLDB agnostic) it looks for one
* function called xmldb_debug() and invokes it, passing both the
- * message code and the whole object.
+ * message code and the whole object.
* So, to perform custom debugging just add such function to your libs.
- *
+ *
* Call to the external hook function can be disabled by request by
* defining XMLDB_SKIP_DEBUG_HOOK
*/
$string = str_replace($foundconcats,array_keys($foundconcats),$string);
}
- /// Extract all the quoted elements from the string (skipping
+ /// Extract all the quoted elements from the string (skipping
/// backslashed quotes that are part of the content.
preg_match_all("/(''|'.*?[^\\\\]')/is", $string, $matches);
foreach (array_unique($matches[0]) as $key=>$value) {
return $arr;
}
}
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
/// Deprecated API ends here
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
}
}
-
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
}
/// Deprecated API ends here
-
-?>