[svn r10184] adding number of courses per language

skala
Bart Mollet 19 years ago
parent 8ca2237503
commit d4c2110690
  1. 4
      main/admin/statistics/index.php
  2. 15
      main/admin/statistics/statistics.lib.php

@ -54,6 +54,7 @@ $strUsers = get_lang('Users');
$tools[$strCourse]['action=courses'] = get_lang('CountCours');
$tools[$strCourse]['action=tools'] = get_lang('PlatformToolAccess');
$tools[$strCourse]['action=courselastvisit'] = get_lang('LastAccess');
$tools[$strCourse]['action=coursebylanguage'] = get_lang('CountCourseByLanguage');
$tools[$strUsers]['action=users'] = get_lang('CountUsers');
@ -113,6 +114,9 @@ switch($_GET['action'])
// students for each course category
statistics::print_stats(get_lang('Students'),$students);
break;
case 'coursebylanguage':
statistics::print_course_by_language_stats();
break;
case 'logins':
statistics::print_login_stats($_GET['type']);

@ -241,6 +241,21 @@ class Statistics
}
Statistics::print_stats(get_lang('PlatformToolAccess'),$result,true);
}
/**
* Show some stats about the number of courses per language
*/
function print_course_by_language_stats()
{
$table = Database::get_main_table(MAIN_COURSE_TABLE);
$sql = "SELECT course_language, count( code ) AS number_of_courses FROM $table GROUP BY course_language ";
$res = api_sql_query($sql,__FILE__,__LINE__);
$result = array();
while($obj = mysql_fetch_object($res))
{
$result[$obj->course_language] = $obj->number_of_courses;
}
Statistics::print_stats(get_lang('CountCourseByLanguage'),$result,true);
}
/**
* Shows the number of users having their picture uploaded in Dokeos.
*/

Loading…
Cancel
Save