Skip to content

Commit 2074a68

Browse files
committed
Adding static declarations
1 parent b6ae78c commit 2074a68

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

main/exercice/testcategory.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function display($in_color="#E0EBF5") {
134134
If in_field=="" Return an array of all category objects in the database
135135
Otherwise, return an array of all in_field value in the database (in_field = id or name or description)
136136
*/
137-
public function getCategoryListInfo($in_field="", $in_courseid="") {
137+
public static function getCategoryListInfo($in_field="", $in_courseid="") {
138138
if (empty($in_courseid) || $in_courseid=="") {
139139
$in_courseid = api_get_course_int_id();
140140
}
@@ -313,7 +313,7 @@ public static function getNumberOfQuestionRandomByCategory($in_testid, $in_nbran
313313
* tabresult[0] = get_lang('NoCategory');
314314
*
315315
*/
316-
function getCategoriesIdAndName($in_courseid="") {
316+
static function getCategoriesIdAndName($in_courseid="") {
317317
if (empty($in_courseid) || $in_courseid=="") {
318318
$in_courseid = api_get_course_int_id();
319319
}

main/inc/lib/pear/HTML/QuickForm/advanced_settings.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,15 @@ function HTML_QuickForm_advanced_settings($text = null)
3434
$this->HTML_QuickForm_static(null, null, $text);
3535
$this->_type = 'html';
3636
}
37-
38-
// }}}
39-
// {{{ accept()
40-
37+
4138
/**
4239
* Accepts a renderer
4340
*
4441
* @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
4542
* @access public
4643
* @return void
4744
*/
48-
function accept(&$renderer)
45+
function accept(&$renderer, $required=false, $error=null)
4946
{
5047
$renderer->renderHtml($this);
5148
} // end func accept
@@ -61,8 +58,4 @@ function toHtml() {
6158
6259
';
6360
} //end func toHtml
64-
65-
66-
67-
// }}}
6861
} //end class HTML_QuickForm_html

main/inc/lib/pear/HTML/QuickForm/label.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function HTML_QuickForm_label($label = null, $text = null) {
4444
* @access public
4545
* @return void
4646
*/
47-
function accept(&$renderer) {
47+
function accept(&$renderer, $required=false, $error=null) {
4848
$renderer->renderHtml($this);
4949
}
5050

main/newscorm/learnpath.class.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6667,9 +6667,12 @@ public function display_item_form($item_type, $title = '', $action = 'add_item',
66676667
// POSITION
66686668
for ($i = 0; $i < count($arrLP); $i++) {
66696669
if ($arrLP[$i]['parent_item_id'] == $parent && $arrLP[$i]['id'] != $id) {
6670-
if ($extra_info['previous_item_id'] == $arrLP[$i]['id'])
6670+
//this is the same!
6671+
if (isset($extra_info['previous_item_id']) && $extra_info['previous_item_id'] == $arrLP[$i]['id']) {
66716672
$s_selected_position = $arrLP[$i]['id'];
6672-
elseif ($action == 'add') $s_selected_position = $arrLP[$i]['id'];
6673+
} elseif ($action == 'add') {
6674+
$s_selected_position = $arrLP[$i]['id'];
6675+
}
66736676

66746677
$arrHide[$arrLP[$i]['id']]['value'] = get_lang('After') . ' "' . $arrLP[$i]['title'] . '"';
66756678
}

0 commit comments

Comments
 (0)