Adding static declarations

skala
Julio Montoya 14 years ago
parent b6ae78cf94
commit 2074a68f0f
  1. 4
      main/exercice/testcategory.class.php
  2. 11
      main/inc/lib/pear/HTML/QuickForm/advanced_settings.php
  3. 2
      main/inc/lib/pear/HTML/QuickForm/label.php
  4. 7
      main/newscorm/learnpath.class.php

@ -134,7 +134,7 @@ class Testcategory {
If in_field=="" Return an array of all category objects in the database
Otherwise, return an array of all in_field value in the database (in_field = id or name or description)
*/
public function getCategoryListInfo($in_field="", $in_courseid="") {
public static function getCategoryListInfo($in_field="", $in_courseid="") {
if (empty($in_courseid) || $in_courseid=="") {
$in_courseid = api_get_course_int_id();
}
@ -313,7 +313,7 @@ class Testcategory {
* tabresult[0] = get_lang('NoCategory');
*
*/
function getCategoriesIdAndName($in_courseid="") {
static function getCategoriesIdAndName($in_courseid="") {
if (empty($in_courseid) || $in_courseid=="") {
$in_courseid = api_get_course_int_id();
}

@ -34,10 +34,7 @@ class HTML_QuickForm_advanced_settings extends HTML_QuickForm_static
$this->HTML_QuickForm_static(null, null, $text);
$this->_type = 'html';
}
// }}}
// {{{ accept()
/**
* Accepts a renderer
*
@ -45,7 +42,7 @@ class HTML_QuickForm_advanced_settings extends HTML_QuickForm_static
* @access public
* @return void
*/
function accept(&$renderer)
function accept(&$renderer, $required=false, $error=null)
{
$renderer->renderHtml($this);
} // end func accept
@ -61,8 +58,4 @@ class HTML_QuickForm_advanced_settings extends HTML_QuickForm_static
';
} //end func toHtml
// }}}
} //end class HTML_QuickForm_html

@ -44,7 +44,7 @@ class HTML_QuickForm_label extends HTML_QuickForm_static
* @access public
* @return void
*/
function accept(&$renderer) {
function accept(&$renderer, $required=false, $error=null) {
$renderer->renderHtml($this);
}

@ -6667,9 +6667,12 @@ class learnpath {
// POSITION
for ($i = 0; $i < count($arrLP); $i++) {
if ($arrLP[$i]['parent_item_id'] == $parent && $arrLP[$i]['id'] != $id) {
if ($extra_info['previous_item_id'] == $arrLP[$i]['id'])
//this is the same!
if (isset($extra_info['previous_item_id']) && $extra_info['previous_item_id'] == $arrLP[$i]['id']) {
$s_selected_position = $arrLP[$i]['id'];
elseif ($action == 'add') $s_selected_position = $arrLP[$i]['id'];
} elseif ($action == 'add') {
$s_selected_position = $arrLP[$i]['id'];
}
$arrHide[$arrLP[$i]['id']]['value'] = get_lang('After') . ' "' . $arrLP[$i]['title'] . '"';
}

Loading…
Cancel
Save