Fixing PHP warnings

skala
Julio Montoya 13 years ago
parent 3f6998f09f
commit 598e9e9a74
  1. 2
      main/gradebook/gradebook_view_result.php
  2. 2
      main/gradebook/lib/be/abstractlink.class.php
  3. 5
      main/gradebook/lib/be/linkfactory.class.php
  4. 6
      main/gradebook/lib/fe/displaygradebook.php
  5. 3
      main/gradebook/lib/fe/flatviewtable.class.php
  6. 4
      main/gradebook/lib/fe/gradebooktable.class.php
  7. 2
      main/gradebook/lib/fe/resulttable.class.php

@ -372,7 +372,7 @@ if (isset ($_GET['print'])) {
}
$newarray = array();
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 2);
$newarray[] = array_slice($data, 3);
}
echo print_table($newarray, $header_names,get_lang('ViewResult'), $eval[0]->get_name());

@ -194,7 +194,7 @@ abstract class AbstractLink implements GradebookItem {
private static function create_objects_from_sql_result($result) {
$links=array();
while ($data=Database::fetch_array($result)) {
$link = LinkFactory::create(intval($data['type']));
$link = LinkFactory::create($data['type']);
$link->set_id($data['id']);
$link->set_type($data['type']);
$link->set_ref_id($data['ref_id']);

@ -80,7 +80,8 @@ class LinkFactory
* Static method to create specific link objects
* @param $type link type
*/
public function create ($type) {
public static function create ($type) {
$type = intval($type);
switch ($type) {
case LINK_EXERCISE:
return new ExerciseLink();
@ -103,7 +104,7 @@ class LinkFactory
/**
* Return an array of all known link types
*/
public function get_all_types () {
public static function get_all_types () {
//LINK_DROPBOX,
return array (LINK_EXERCISE,
//LINK_DROPBOX,

@ -17,7 +17,7 @@ class DisplayGradebook
* @param $shownavbar 1=show navigation bar
* @param $forpdf only output for pdf file
*/
function display_header_result($evalobj, $selectcat, $page) {
static function display_header_result($evalobj, $selectcat, $page) {
if (api_is_allowed_to_edit(null, true)) {
$header = '<div class="actions">';
if ($page != 'statistics') {
@ -158,7 +158,7 @@ class DisplayGradebook
* @param $showeval
* @param $showlink
*/
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
static function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header = '<div class="actions">';
if ($catobj->get_parent_id() == 0) {
$select_cat = $catobj->get_id();
@ -356,7 +356,7 @@ class DisplayGradebook
* @param boolean Whether to show or not the link to add a new item inside the qualification (we hide it in case of the course-embedded tool where we have only one calification per course or session)
* @return void Everything is printed on screen upon closing
*/
function display_header_gradebook($catobj, $showtree, $selectcat, $is_course_admin, $is_platform_admin, $simple_search_form, $show_add_qualification = true, $show_add_link = true) {
static function display_header_gradebook($catobj, $showtree, $selectcat, $is_course_admin, $is_platform_admin, $simple_search_form, $show_add_qualification = true, $show_add_link = true) {
//student
$status = CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
$objcat = new Category();

@ -410,8 +410,7 @@ class FlatViewTable extends SortableTable
/**
* Function used by SortableTable to generate the data to display
*/
function get_table_data ($from = 1) {
function get_table_data ($from = 1, $per_page = null, $column = null, $direction = null, $sort = null) {
$is_western_name_order = api_is_western_name_order();
// create page navigation if needed

@ -186,10 +186,10 @@ class GradebookTable extends SortableTable {
$main_categories[$item->get_id()]['name'] = $item->get_name();
} else {
$row[] = $invisibility_span_open.$this->build_name_link($item) . $invisibility_span_close;
$main_categories[$item->get_id()] = $this->build_name_link($item);
$main_categories[$item->get_id()]['name'] = $this->build_name_link($item);
}
$main_categories[$item->get_id()]['weight'] = $item->get_weight();
$main_categories[$item->get_id()]['weight']= $item->get_weight();
$total_categories_weight += $item->get_weight();
//Description

@ -74,7 +74,7 @@ class ResultTable extends SortableTable
/**
* Function used by SortableTable to generate the data to display
*/
function get_table_data ($from = 1) {
function get_table_data ($from = 1, $per_page = null, $column = null, $direction = null, $sort = null) {
$is_western_name_order = api_is_western_name_order();
$scoredisplay = ScoreDisplay :: instance();

Loading…
Cancel
Save