Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent 33a4ff908c
commit ee625ef1bc
  1. 18
      main/coursecopy/copy_course_session.php
  2. 34
      main/webservices/access_url.php
  3. 9
      plugin/buycourses/src/service_process_confirm.php
  4. 25
      plugin/buycourses/src/service_success.php
  5. 5
      plugin/buycourses/src/services_edit.php
  6. 16
      plugin/buycourses/src/success.php
  7. 14
      plugin/dashboard/block_course/block_course.class.php
  8. 6
      plugin/dashboard/block_daily/block_daily.class.php
  9. 28
      plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php
  10. 8
      plugin/dashboard/block_global_info/block_global_info.class.php
  11. 24
      plugin/dashboard/block_session/block_session.class.php
  12. 30
      plugin/dashboard/block_student/block_student.class.php
  13. 19
      plugin/dashboard/block_student_graph/block_student_graph.class.php
  14. 3
      plugin/dashboard/block_teacher/block_teacher.class.php
  15. 11
      plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php

@ -48,8 +48,12 @@ $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
/* FUNCTIONS */
/**
* @param string $name
* @param array $sessions
* @param array $attr
* @return string
*/
function make_select_session_list($name, $sessions, $attr = array())
{
$attributes = '';
@ -83,6 +87,9 @@ function make_select_session_list($name, $sessions, $attr = array())
return $output;
}
/**
* @return string
*/
function display_form()
{
$html = '';
@ -138,6 +145,11 @@ function display_form()
echo $html;
}
/**
* @param int $id_session
* @param string $type
* @return xajaxResponse
*/
function search_courses($id_session, $type)
{
global $tbl_course, $tbl_session_rel_course, $course_list;
@ -221,12 +233,12 @@ function search_courses($id_session, $type)
);
}
}
return $xajax_response;
}
$xajax->processRequests();
/* HTML head extra */
$htmlHeadXtra[] = $xajax->getJavascript(api_get_path(WEB_LIBRARY_PATH).'xajax/');
$htmlHeadXtra[] = '<script>
function checkSelected(id_select,id_radio,id_title,id_destination) {

@ -62,21 +62,24 @@ function WSHelperVerifyKey($params)
list($ip1, $ip2) = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
$ip = trim($ip1);
}
if ($debug)
if ($debug) {
error_log("ip: $ip");
}
// Check if a file that limits access from webservices exists and contains
// the restraining check
if (is_file('webservice-auth-ip.conf.php')) {
include 'webservice-auth-ip.conf.php';
if ($debug)
if ($debug) {
error_log("webservice-auth-ip.conf.php file included");
}
if (!empty($ws_auth_ip)) {
$check_ip = true;
$ip_matches = api_check_ip_in_range($ip, $ws_auth_ip);
if ($debug)
if ($debug) {
error_log("ip_matches: $ip_matches");
}
}
}
if ($debug) {
error_log("checkip ".intval($check_ip));
@ -91,8 +94,9 @@ function WSHelperVerifyKey($params)
$result = api_is_valid_secret_key($secret_key, $security_key);
//error_log($secret_key.'-'.$security_key);
if ($debug)
if ($debug) {
error_log('WSHelperVerifyKey result: '.intval($result));
}
return $result;
}
@ -114,8 +118,6 @@ $server->soap_defencoding = 'UTF-8';
// Initialize WSDL support
$server->configureWSDL('WSAccessUrl', 'urn:WSAccessUrl');
$server->wsdl->addComplexType(
'portalItem',
'complexType',
@ -135,7 +137,13 @@ $server->wsdl->addComplexType(
'',
'SOAP-ENC:Array',
array(),
array(array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:portalItem[]')), 'tns:portalItem'
array(
array(
'ref' => 'SOAP-ENC:arrayType',
'wsdl:arrayType' => 'tns:portalItem[]',
),
),
'tns:portalItem'
);
$server->wsdl->addComplexType(
@ -197,7 +205,8 @@ $server->wsdl->addComplexType(
);
// Register the method to expose
$server->register('WSAddUserToPortal', // method name
$server->register(
'WSAddUserToPortal', // method name
array('addUserToPortal' => 'tns:AddUserToPortal'), // input parameters
array('return' => 'xsd:string'), // output parameters
'urn:WSAccessUrl', // namespace
@ -228,7 +237,8 @@ function WSAddUserToPortal($params)
}
// Register the method to expose
$server->register('WSRemoveUserFromPortal', // method name
$server->register(
'WSRemoveUserFromPortal', // method name
array('removeUserFromPortal' => 'tns:AddUserToPortal'), // input parameters
array('return' => 'xsd:string'), // output parameters
'urn:WSAccessUrl', // namespace
@ -271,7 +281,8 @@ $server->wsdl->addComplexType(
);
// Register the method to expose
$server->register('WSGetPortalListFromUser', // method name
$server->register(
'WSGetPortalListFromUser', // method name
array('getPortalListFromUser' => 'tns:getPortalListFromUser'), // input parameters
array('return' => 'tns:portalList'), // output parameters
'urn:WSAccessUrl', // namespace
@ -315,7 +326,8 @@ $server->wsdl->addComplexType(
);
// Register the method to expose
$server->register('WSGetPortalListFromCourse', // method name
$server->register(
'WSGetPortalListFromCourse', // method name
array('getPortalListFromCourse' => 'tns:getPortalListFromCourse'), // input parameters
array('return' => 'tns:portalList'), // output parameters
'urn:WSAccessUrl', // namespace

@ -83,7 +83,14 @@ switch ($serviceSale['payment_type']) {
case BuyCoursesPlugin::PAYMENT_TYPE_TRANSFER:
$transferAccounts = $plugin->getTransferAccounts();
$form = new FormValidator('success', 'POST', api_get_self(), null, null, FormValidator::LAYOUT_INLINE);
$form = new FormValidator(
'success',
'POST',
api_get_self(),
null,
null,
FormValidator::LAYOUT_INLINE
);
if ($form->validate()) {
$formValues = $form->getSubmitValues();

@ -15,7 +15,6 @@ if (!$paypalEnabled) {
}
$serviceSaleId = $_SESSION['bc_service_sale_id'];
$serviceSale = $plugin->getServiceSale($serviceSaleId);
$itemPrice = $serviceSale['price'];
@ -34,8 +33,20 @@ require_once("paypalfunctions.php");
$buyerInformation = GetShippingDetails(urlencode($_SESSION['TOKEN']));
$form = new FormValidator('success', 'POST', api_get_self(), null, null, FormValidator::LAYOUT_INLINE);
$form->addButton('confirm', $plugin->get_lang('ConfirmOrder'), 'check', 'success');
$form = new FormValidator(
'success',
'POST',
api_get_self(),
null,
null,
FormValidator::LAYOUT_INLINE
);
$form->addButton(
'confirm',
$plugin->get_lang('ConfirmOrder'),
'check',
'success'
);
$form->addButtonCancel($plugin->get_lang('CancelOrder'), 'cancel');
if ($form->validate()) {
@ -54,7 +65,6 @@ if ($form->validate()) {
}
$confirmPayments = ConfirmPayment($itemPrice);
if ($confirmPayments['ACK'] !== 'Success') {
$erroMessage = vsprintf(
$plugin->get_lang('ErrorOccurred'),
@ -154,16 +164,17 @@ if ($form->validate()) {
}
$token = isset($_GET['token']) ? Security::remove_XSS($_GET['token']) : null;
if (empty($token)) {
api_not_allowed(true);
}
$interbreadcrumb[] = array("url" => "service_catalog.php", "name" => $plugin->get_lang('ListOfServicesOnSale'));
$interbreadcrumb[] = array(
"url" => "service_catalog.php",
"name" => $plugin->get_lang('ListOfServicesOnSale'),
);
$templateName = $plugin->get_lang('PaymentMethods');
$tpl = new Template($templateName);
$tpl->assign('title', $serviceSale['service']['name']);
$tpl->assign('price', $serviceSale['price']);
$tpl->assign('currency', $serviceSale['currency_id']);

@ -131,21 +131,16 @@ if ($form->validate()) {
$values = $form->getSubmitValues();
if (isset($values['delete_service'])) {
$plugin->deleteService($serviceId);
Display::addFlash(
Display::return_message($plugin->get_lang('ServiceDeleted'), 'error')
);
} else {
$plugin->updateService($values, $serviceId);
Display::addFlash(
Display::return_message($plugin->get_lang('ServiceEdited'), 'success')
);
}
header('Location: configuration.php');
exit;
}

@ -44,7 +44,14 @@ $paypalSignature = $paypalParams['signature'];
require_once("paypalfunctions.php");
$form = new FormValidator('success', 'POST', api_get_self(), null, null, FormValidator::LAYOUT_INLINE);
$form = new FormValidator(
'success',
'POST',
api_get_self(),
null,
null,
FormValidator::LAYOUT_INLINE
);
$form->addButton('confirm', $plugin->get_lang('ConfirmOrder'), 'check', 'success');
$form->addButtonCancel($plugin->get_lang('CancelOrder'), 'cancel');
@ -74,13 +81,12 @@ if ($form->validate()) {
exit;
}
$transactionId = $confirmPayments["PAYMENTINFO_0_TRANSACTIONID"];
$transactionType = $confirmPayments["PAYMENTINFO_0_TRANSACTIONTYPE"];
$transactionId = $confirmPayments['PAYMENTINFO_0_TRANSACTIONID'];
$transactionType = $confirmPayments['PAYMENTINFO_0_TRANSACTIONTYPE'];
switch ($confirmPayments["PAYMENTINFO_0_PAYMENTSTATUS"]) {
switch ($confirmPayments['PAYMENTINFO_0_PAYMENTSTATUS']) {
case 'Completed':
$saleIsCompleted = $plugin->completeSale($sale['id']);
if ($saleIsCompleted && $buyingSession) {
Display::addFlash(
Display::return_message(

@ -7,7 +7,8 @@
*/
/**
* This class is used like controller for this course block plugin,
* the class name must be registered inside path.info file (e.g: controller = "BlockCourse"), so dashboard controller will be instantiate it
* the class name must be registered inside path.info file
* (e.g: controller = "BlockCourse"), so dashboard controller will be instantiate it
* @package chamilo.dashboard
*/
class BlockCourse extends Block
@ -51,7 +52,8 @@ class BlockCourse extends Block
}
/**
* This method return content html containing information about courses and its position for showing it inside dashboard interface
* This method return content html containing information
* about courses and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
@ -92,10 +94,7 @@ class BlockCourse extends Block
public function get_content_html()
{
$course_data = $this->get_course_information_data();
//$content = '<div style="margin:10px;">';
$content = '<h4>'.get_lang(
'YourCourseList'
).'</h4>';
$content = '<h4>'.get_lang('YourCourseList').'</h4>';
$data_table = null;
if (!empty($course_data)) {
$data_table .= '<table class="data_table" width:"95%">';
@ -172,7 +171,8 @@ class BlockCourse extends Block
if (count($users) > 0) {
$nb_students_in_course = count($users);
$avg_time_spent_in_course = api_time_to_hms(
Tracking::get_time_spent_on_the_course($users, $courseId) / $nb_students_in_course);
Tracking::get_time_spent_on_the_course($users, $courseId) / $nb_students_in_course
);
} else {
$avg_time_spent_in_course = null;
}

@ -66,7 +66,6 @@ class BlockDaily extends Block
*/
public function get_block()
{
global $charset;
$column = 2;
$data = array();
@ -101,10 +100,7 @@ class BlockDaily extends Block
public function get_content_html()
{
$course_data = $this->get_course_information_data();
//$content = '<div style="margin:10px;">';
$content = '<h4>'.get_lang(
'YourCourseList'
).'</h4>';
$content = '<h4>'.get_lang('YourCourseList').'</h4>';
$data_table = null;
if (!empty($course_data)) {
$data_table .= '<table class="data_table" width:"95%">';

@ -5,7 +5,6 @@ use CpChart\Chart\Data as pData;
use CpChart\Chart\Image as pImage;
use CpChart\Chart\Cache as pCache;
/**
* Class BlockEvaluationGraph
* This class is used like controller for this evaluations graph block plugin,
@ -62,7 +61,8 @@ class BlockEvaluationGraph extends Block
}
/**
* This method return content html containing information about sessions and its position for showing it inside dashboard interface
* This method return content html containing
* information about sessions and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
@ -71,7 +71,6 @@ class BlockEvaluationGraph extends Block
global $charset;
$column = 1;
$data = array();
$evaluations_base_courses_graph = $this->get_evaluations_base_courses_graph();
$evaluations_courses_in_sessions_graph = $this->get_evaluations_courses_in_sessions_graph();
@ -126,7 +125,15 @@ class BlockEvaluationGraph extends Block
if (!empty($this->courses)) {
$courses_code = array_keys($this->courses);
foreach ($courses_code as $course_code) {
$cats = Category::load(null, null, $course_code, null, null, null, false);
$cats = Category::load(
null,
null,
$course_code,
null,
null,
null,
false
);
if (isset($cats) && isset($cats[0])) {
$alleval = $cats[0]->get_evaluations(null, true, $course_code);
@ -331,16 +338,21 @@ class BlockEvaluationGraph extends Block
$dataSet->setSerieDescription('Serie2', get_lang('Avg'));
$dataSet->setSerieDescription('Serie3', get_lang('Min'));
$dataSet->setAbscissa('Labels');
$dataSet->setAbscissaName(get_lang('EvaluationName'));
$dataSet->normalize(100, '%');
$dataSet->loadPalette(api_get_path(SYS_CODE_PATH).'palettes/pchart/default.color', true);
// Cache definition
$cachePath = api_get_path(SYS_ARCHIVE_PATH);
$myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1)));
$myCache = new pCache(
array(
'CacheFolder' => substr(
$cachePath,
0,
strlen($cachePath) - 1
),
)
);
$chartHash = $myCache->getHash($dataSet);
if ($myCache->isInCache($chartHash)) {
$imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash;

@ -56,7 +56,8 @@ class BlockGlobalInfo extends Block
/**
* This method return content html containing information about courses and its position for showing it inside dashboard interface
* This method return content html containing information
* about courses and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
@ -66,8 +67,7 @@ class BlockGlobalInfo extends Block
$column = 2;
$data = array();
$content = $this->get_content_html();
$html = '
<div class="panel panel-default" id="intro">
$html = '<div class="panel panel-default" id="intro">
<div class="panel-heading">'.get_lang('GlobalPlatformInformation').'
<div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'">
<em class="fa fa-times"></em>
@ -91,7 +91,6 @@ class BlockGlobalInfo extends Block
public function get_content_html()
{
$global_data = $this->get_global_information_data();
//$content = '<div style="margin:10px;">';
$content = '<h4>'.get_lang('GlobalPlatformInformation').'</h4>';
$data_table = null;
if (!empty($global_data)) {
@ -115,6 +114,7 @@ class BlockGlobalInfo extends Block
$data_table .= get_lang('ThereIsNoInformationAboutThePlatform');
}
$content .= $data_table;
//$content .= '</div>';
return $content;

@ -48,22 +48,18 @@ class BlockSession extends Block
}
/**
* This method return content html containing information about sessions and its position for showing it inside dashboard interface
* This method return content html containing
* information about sessions and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
public function get_block()
{
global $charset;
$column = 2;
$data = array();
$content = $this->get_content_html();
$content_html = '
<div class="panel panel-default" id="intro">
$content_html = '<div class="panel panel-default" id="intro">
<div class="panel-heading">
'.get_lang('SessionsInformation').'
<div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'">
@ -88,13 +84,9 @@ class BlockSession extends Block
*/
public function get_content_html()
{
$content = '';
$sessions = $this->sessions;
//$content = '<div style="margin:10px;">';
$content .= '<h4>'.get_lang('YourSessionsList').'</h4>';
if (count($sessions) > 0) {
$sessions_table = '<table class="data_table" width:"95%">';
$sessions_table .= '<tr>
@ -104,7 +96,6 @@ class BlockSession extends Block
</tr>';
$i = 1;
foreach ($sessions as $session) {
$session_id = intval($session['id']);
$title = $session['name'];
@ -127,8 +118,11 @@ class BlockSession extends Block
$count_courses_in_session = count(Tracking::get_courses_list_from_session($session_id));
if ($i % 2 == 0) $class_tr = 'row_odd';
else $class_tr = 'row_even';
if ($i % 2 == 0) {
$class_tr = 'row_odd';
} else {
$class_tr = 'row_even';
}
$sessions_table .= '<tr class="'.$class_tr.'">
<td>'.$title.'</td>
@ -147,8 +141,6 @@ class BlockSession extends Block
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/session.php">'.get_lang('SeeMore').'</a></div>';
}
//$content .= '</div>';
return $content;
}

@ -8,7 +8,8 @@
/**
* This class is used like controller for student block plugin,
* the class name must be registered inside path.info file (e.g: controller = "BlockStudent"), so dashboard controller will be instantiate it
* the class name must be registered inside path.info file
* (e.g: controller = "BlockStudent"), so dashboard controller will be instantiate it
* @package chamilo.dashboard
*/
class BlockStudent extends Block
@ -47,7 +48,8 @@ class BlockStudent extends Block
}
/**
* This method return content html containing information about students and its position for showing it inside dashboard interface
* This method return content html containing information
* about students and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
@ -56,7 +58,6 @@ class BlockStudent extends Block
global $charset;
$column = 1;
$data = array();
$student_content_html = $this->get_students_content_html_for_drh();
$html = '<div class="panel panel-default" id="intro">
<div class="panel-heading">
@ -72,6 +73,7 @@ class BlockStudent extends Block
</div>';
$data['column'] = $column;
$data['content_html'] = $html;
return $data;
}
@ -82,7 +84,6 @@ class BlockStudent extends Block
public function get_students_content_html_for_platform_admin()
{
$students = $this->students;
//$content = '<div style="margin:10px;">';
$content = '<h4>'.get_lang('YourStudents').'</h4>';
$students_table = null;
if (count($students) > 0) {
@ -99,7 +100,6 @@ class BlockStudent extends Block
$i = 1;
foreach ($students as $student) {
$courses_by_user = CourseManager::get_courses_list_by_user_id($student['user_id'], true);
$count_courses = count($courses_by_user);
$rowspan = $count_courses ? $count_courses + 1 : 2;
@ -150,10 +150,13 @@ class BlockStudent extends Block
return $content;
}
public function get_students_content_html_for_drh() {
/**
* @return string
*/
public function get_students_content_html_for_drh()
{
$attendance = new Attendance();
$students = $this->students;
//$content = '<div style="margin:5px;">';
$content = '<h4>'.get_lang('YourStudents').'</h4>';
$students_table = null;
if (count($students) > 0) {
@ -165,13 +168,10 @@ class BlockStudent extends Block
</tr>';
$i = 1;
foreach ($students as $student) {
$student_id = $student['user_id'];
$firstname = $student['firstname'];
$lastname = $student['lastname'];
$username = $student['username'];
// get average of faults in attendances by student
$results_faults_avg = $attendance->get_faults_average_inside_courses($student_id);
if (!empty($results_faults_avg)) {
@ -185,7 +185,15 @@ class BlockStudent extends Block
$score = $weight = 0;
foreach ($courses_by_user as $course) {
$course_code = $course['code'];
$cats = Category::load(null, null, $course_code, null, null, null, false);
$cats = Category::load(
null,
null,
$course_code,
null,
null,
null,
false
);
$scoretotal = array();
if (isset($cats) && isset($cats[0])) {
$scoretotal = $cats[0]->calc_score($student_id, null, $course_code);

@ -15,12 +15,12 @@ use CpChart\Chart\Cache as pCache;
/**
* This class is used like controller for student graph block plugin,
* the class name must be registered inside path.info file (e.g: controller = "BlockStudentGraph"), so dashboard controller will be instantiate it
* the class name must be registered inside path.info file
* (e.g: controller = "BlockStudentGraph"), so dashboard controller will be instantiate it
* @package chamilo.dashboard
*/
class BlockStudentGraph extends Block
{
private $user_id;
private $students;
private $path;
@ -66,7 +66,6 @@ class BlockStudentGraph extends Block
*/
public function get_block()
{
global $charset;
$column = 1;
$data = array();
@ -96,7 +95,6 @@ class BlockStudentGraph extends Block
*/
public function get_students_attendance_graph()
{
$students = $this->students;
$attendance = new Attendance();
@ -127,9 +125,7 @@ class BlockStudentGraph extends Block
$graph = '';
$img_file = '';
if (is_array($usernames) && count($usernames) > 0) {
// Defining data
$dataSet = new pData();
$dataSet->addPoints($faults, 'Serie1');
@ -152,14 +148,21 @@ class BlockStudentGraph extends Block
);
// Cache definition
$cachePath = api_get_path(SYS_ARCHIVE_PATH);
$myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1)));
$myCache = new pCache(
array(
'CacheFolder' => substr(
$cachePath,
0,
strlen($cachePath) - 1
),
)
);
$chartHash = $myCache->getHash($dataSet);
if ($myCache->isInCache($chartHash)) {
$imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash;
$myCache->saveFromCache($chartHash, $imgPath);
$imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash;
} else {
$maxCounts = max(count($usernames), count($faults));
if ($maxCounts < 5) {
$heightSize = 200;

@ -62,7 +62,6 @@ class BlockTeacher extends Block
$column = 1;
$data = array();
$teacher_content_html = $this->get_teachers_content_html_for_drh();
$html = '
<div class="panel panel-default" id="intro">
<div class="panel-heading">
@ -139,8 +138,6 @@ class BlockTeacher extends Block
<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=admin">'.get_lang('SeeMore').'</a></div>';
}
//$content .= '</div>';
return $content;
}

@ -83,7 +83,6 @@ class BlockTeacherGraph extends Block
$data['content_html'] = $html;
return $data;
}
/**
@ -94,7 +93,6 @@ class BlockTeacherGraph extends Block
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
$a_last_week = get_last_week();
@ -109,7 +107,12 @@ class BlockTeacherGraph extends Block
$start_date = api_get_utc_datetime($day);
$end_date = api_get_utc_datetime($day + (3600 * 24 - 1));
$time_on_platform_by_day = Tracking::get_time_spent_on_the_platform($user_id, 'custom', $start_date, $end_date);
$time_on_platform_by_day = Tracking::get_time_spent_on_the_platform(
$user_id,
'custom',
$start_date,
$end_date
);
$hours = floor($time_on_platform_by_day / 3600);
$min = floor(($time_on_platform_by_day - ($hours * 3600)) / 60);
$time_by_days[] = $min;
@ -138,12 +141,10 @@ class BlockTeacherGraph extends Block
$myCache->saveFromCache($chartHash, $imgPath);
$imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash;
} else {
/* Create the pChart object */
$widthSize = 440;
$heightSize = 350;
$angle = 50;
$myPicture = new pImage($widthSize, $heightSize, $dataSet);
/* Turn of Antialiasing */

Loading…
Cancel
Save