@@ -27,9 +27,9 @@ |
||
27 | 27 | public function delete($id) |
28 | 28 | { |
29 | 29 | |
30 | - return $this->request("DELETE", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key); |
|
30 | + return $this->request("DELETE", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key); |
|
31 | 31 | |
32 | - } |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | 35 |
@@ -4,17 +4,17 @@ |
||
4 | 4 | |
5 | 5 | class AuthBearer implements \Requests_Auth |
6 | 6 | { |
7 | - protected $password; |
|
7 | + protected $password; |
|
8 | 8 | |
9 | - public function __construct($password) { |
|
10 | - $this->password = $password; |
|
11 | - } |
|
9 | + public function __construct($password) { |
|
10 | + $this->password = $password; |
|
11 | + } |
|
12 | 12 | |
13 | - public function register(\Requests_Hooks &$hooks) { |
|
14 | - $hooks->register('requests.before_request', array(&$this, 'before_request')); |
|
15 | - } |
|
13 | + public function register(\Requests_Hooks &$hooks) { |
|
14 | + $hooks->register('requests.before_request', array(&$this, 'before_request')); |
|
15 | + } |
|
16 | 16 | |
17 | - public function before_request(&$url, &$headers, &$data, &$type, &$options) { |
|
18 | - $headers['Authorization: Bearer'] = $this->password; |
|
19 | - } |
|
17 | + public function before_request(&$url, &$headers, &$data, &$type, &$options) { |
|
18 | + $headers['Authorization: Bearer'] = $this->password; |
|
19 | + } |
|
20 | 20 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | self::$api_base = "https://pago.culqi.com/api/v1"; |
39 | 39 | } |
40 | 40 | else { |
41 | - self::$api_base = "https://integ-pago.culqi.com/api/v1"; |
|
41 | + self::$api_base = "https://integ-pago.culqi.com/api/v1"; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | } |
@@ -7,8 +7,8 @@ |
||
7 | 7 | class Client |
8 | 8 | { |
9 | 9 | /** |
10 | - * La versión de API usada |
|
11 | - */ |
|
10 | + * La versión de API usada |
|
11 | + */ |
|
12 | 12 | const API_VERSION = "v1.2"; |
13 | 13 | |
14 | 14 | /** |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | const VISIBLE_STUDENT = 2; |
11 | 11 | const VISIBLE_TEACHER = 3; |
12 | 12 | |
13 | - /** |
|
14 | - * Displays all announcements |
|
15 | - * @param int $visible VISIBLE_GUEST, VISIBLE_STUDENT or VISIBLE_TEACHER |
|
16 | - * @param int $id The identifier of the announcement to display |
|
17 | - */ |
|
18 | - public static function display_announcements($visible, $id = -1) |
|
13 | + /** |
|
14 | + * Displays all announcements |
|
15 | + * @param int $visible VISIBLE_GUEST, VISIBLE_STUDENT or VISIBLE_TEACHER |
|
16 | + * @param int $id The identifier of the announcement to display |
|
17 | + */ |
|
18 | + public static function display_announcements($visible, $id = -1) |
|
19 | 19 | { |
20 | 20 | $user_selected_language = api_get_interface_language(); |
21 | 21 | $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
@@ -426,10 +426,10 @@ discard block |
||
426 | 426 | } |
427 | 427 | |
428 | 428 | /** |
429 | - * Makes the announcement id visible only for groups in groups_array |
|
430 | - * @param int $announcement_id |
|
431 | - * @param array $group_array array of group id |
|
432 | - **/ |
|
429 | + * Makes the announcement id visible only for groups in groups_array |
|
430 | + * @param int $announcement_id |
|
431 | + * @param array $group_array array of group id |
|
432 | + **/ |
|
433 | 433 | public static function announcement_for_groups($announcement_id, $group_array) |
434 | 434 | { |
435 | 435 | $tbl_announcement_group = Database:: get_main_table( |
@@ -462,10 +462,10 @@ discard block |
||
462 | 462 | } |
463 | 463 | |
464 | 464 | /** |
465 | - * Gets the groups of this announce |
|
466 | - * @param int announcement id |
|
467 | - * @return array array of group id |
|
468 | - **/ |
|
465 | + * Gets the groups of this announce |
|
466 | + * @param int announcement id |
|
467 | + * @return array array of group id |
|
468 | + **/ |
|
469 | 469 | public static function get_announcement_groups($announcement_id) |
470 | 470 | { |
471 | 471 | $tbl_announcement_group = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS); |
@@ -485,15 +485,15 @@ discard block |
||
485 | 485 | return $groups; |
486 | 486 | } |
487 | 487 | |
488 | - /** |
|
489 | - * Updates an announcement to the database |
|
490 | - * @param integer $id : id of the announcement |
|
491 | - * @param string $title : title of the announcement |
|
492 | - * @param string $content : content of the announcement |
|
493 | - * @param array $date_start: start date of announcement (0 => day ; 1 => month ; 2 => year ; 3 => hour ; 4 => minute) |
|
494 | - * @param array $date_end : end date of announcement (0 => day ; 1 => month ; 2 => year ; 3 => hour ; 4 => minute) |
|
495 | - * @return bool True on success, false on failure |
|
496 | - */ |
|
488 | + /** |
|
489 | + * Updates an announcement to the database |
|
490 | + * @param integer $id : id of the announcement |
|
491 | + * @param string $title : title of the announcement |
|
492 | + * @param string $content : content of the announcement |
|
493 | + * @param array $date_start: start date of announcement (0 => day ; 1 => month ; 2 => year ; 3 => hour ; 4 => minute) |
|
494 | + * @param array $date_end : end date of announcement (0 => day ; 1 => month ; 2 => year ; 3 => hour ; 4 => minute) |
|
495 | + * @return bool True on success, false on failure |
|
496 | + */ |
|
497 | 497 | public static function update_announcement( |
498 | 498 | $id, |
499 | 499 | $title, |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $sendEmailTest = false |
509 | 509 | ) { |
510 | 510 | $em = Database::getManager(); |
511 | - $announcement = $em->find('ChamiloCoreBundle:SysAnnouncement', $id); |
|
511 | + $announcement = $em->find('ChamiloCoreBundle:SysAnnouncement', $id); |
|
512 | 512 | |
513 | 513 | if (!$announcement) { |
514 | 514 | return false; |
@@ -532,28 +532,28 @@ discard block |
||
532 | 532 | return false; |
533 | 533 | } |
534 | 534 | |
535 | - if (($date_end_to_compare[1] || |
|
535 | + if (($date_end_to_compare[1] || |
|
536 | 536 | $date_end_to_compare[2] || |
537 | 537 | $date_end_to_compare[0]) && |
538 | 538 | !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0]) |
539 | 539 | ) { |
540 | - Display :: display_normal_message(get_lang('InvalidEndDate')); |
|
540 | + Display :: display_normal_message(get_lang('InvalidEndDate')); |
|
541 | 541 | |
542 | - return false; |
|
543 | - } |
|
542 | + return false; |
|
543 | + } |
|
544 | 544 | |
545 | - if (strlen(trim($title)) == 0) { |
|
546 | - Display::display_normal_message(get_lang('InvalidTitle')); |
|
545 | + if (strlen(trim($title)) == 0) { |
|
546 | + Display::display_normal_message(get_lang('InvalidTitle')); |
|
547 | 547 | |
548 | - return false; |
|
549 | - } |
|
548 | + return false; |
|
549 | + } |
|
550 | 550 | |
551 | 551 | $start = api_get_utc_datetime($date_start); |
552 | 552 | $end = api_get_utc_datetime($date_end); |
553 | 553 | |
554 | - //Fixing urls that are sent by email |
|
555 | - //$content = str_replace('src=\"/home/', 'src=\"'.api_get_path(WEB_PATH).'home/', $content); |
|
556 | - //$content = str_replace('file=/home/', 'file='.api_get_path(WEB_PATH).'home/', $content); |
|
554 | + //Fixing urls that are sent by email |
|
555 | + //$content = str_replace('src=\"/home/', 'src=\"'.api_get_path(WEB_PATH).'home/', $content); |
|
556 | + //$content = str_replace('file=/home/', 'file='.api_get_path(WEB_PATH).'home/', $content); |
|
557 | 557 | $content = str_replace('src=\"'.api_get_path(REL_HOME_PATH), 'src=\"'.api_get_path(WEB_PATH).api_get_path(REL_HOME_PATH), $content); |
558 | 558 | $content = str_replace('file='.api_get_path(REL_HOME_PATH), 'file='.api_get_path(WEB_PATH).api_get_path(REL_HOME_PATH), $content); |
559 | 559 | |
@@ -595,81 +595,81 @@ discard block |
||
595 | 595 | $em->merge($announcement); |
596 | 596 | $em->flush(); |
597 | 597 | |
598 | - return true; |
|
599 | - } |
|
598 | + return true; |
|
599 | + } |
|
600 | 600 | |
601 | - /** |
|
602 | - * Deletes an announcement |
|
603 | - * @param int $id The identifier of the announcement that should be |
|
604 | - * @return bool True on success, false on failure |
|
605 | - */ |
|
606 | - public static function delete_announcement($id) |
|
601 | + /** |
|
602 | + * Deletes an announcement |
|
603 | + * @param int $id The identifier of the announcement that should be |
|
604 | + * @return bool True on success, false on failure |
|
605 | + */ |
|
606 | + public static function delete_announcement($id) |
|
607 | 607 | { |
608 | - $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
609 | - $id = intval($id); |
|
610 | - $sql = "DELETE FROM ".$db_table." WHERE id =".$id; |
|
611 | - $res = Database::query($sql); |
|
608 | + $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
609 | + $id = intval($id); |
|
610 | + $sql = "DELETE FROM ".$db_table." WHERE id =".$id; |
|
611 | + $res = Database::query($sql); |
|
612 | 612 | if ($res === false) { |
613 | - return false; |
|
614 | - } |
|
615 | - return true; |
|
616 | - } |
|
617 | - |
|
618 | - /** |
|
619 | - * Gets an announcement |
|
620 | - * @param int $id The identifier of the announcement that should be |
|
621 | - * @return object Object of class StdClass or the required class, containing the query result row |
|
622 | - */ |
|
623 | - public static function get_announcement($id) |
|
613 | + return false; |
|
614 | + } |
|
615 | + return true; |
|
616 | + } |
|
617 | + |
|
618 | + /** |
|
619 | + * Gets an announcement |
|
620 | + * @param int $id The identifier of the announcement that should be |
|
621 | + * @return object Object of class StdClass or the required class, containing the query result row |
|
622 | + */ |
|
623 | + public static function get_announcement($id) |
|
624 | 624 | { |
625 | - $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
626 | - $id = intval($id); |
|
627 | - $sql = "SELECT * FROM ".$db_table." WHERE id = ".$id; |
|
628 | - $announcement = Database::fetch_object(Database::query($sql)); |
|
629 | - |
|
630 | - return $announcement; |
|
631 | - } |
|
632 | - |
|
633 | - /** |
|
634 | - * Change the visibility of an announcement |
|
635 | - * @param int $announcement_id |
|
636 | - * @param int $user For who should the visibility be changed |
|
625 | + $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
626 | + $id = intval($id); |
|
627 | + $sql = "SELECT * FROM ".$db_table." WHERE id = ".$id; |
|
628 | + $announcement = Database::fetch_object(Database::query($sql)); |
|
629 | + |
|
630 | + return $announcement; |
|
631 | + } |
|
632 | + |
|
633 | + /** |
|
634 | + * Change the visibility of an announcement |
|
635 | + * @param int $announcement_id |
|
636 | + * @param int $user For who should the visibility be changed |
|
637 | 637 | * (possible values are VISIBLE_TEACHER, VISIBLE_STUDENT, VISIBLE_GUEST) |
638 | - * @return bool True on success, false on failure |
|
639 | - */ |
|
640 | - public static function set_visibility($announcement_id, $user, $visible) |
|
638 | + * @return bool True on success, false on failure |
|
639 | + */ |
|
640 | + public static function set_visibility($announcement_id, $user, $visible) |
|
641 | 641 | { |
642 | - $db_table = Database::get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
643 | - $visible = intval($visible); |
|
644 | - $announcement_id = intval($announcement_id); |
|
642 | + $db_table = Database::get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
|
643 | + $visible = intval($visible); |
|
644 | + $announcement_id = intval($announcement_id); |
|
645 | 645 | |
646 | 646 | if (!in_array($user, array(self::VISIBLE_GUEST, self::VISIBLE_STUDENT, self::VISIBLE_TEACHER))) { |
647 | 647 | return false; |
648 | 648 | } |
649 | 649 | |
650 | - $field = ($user == self::VISIBLE_TEACHER ? 'visible_teacher' : ($user == self::VISIBLE_STUDENT ? 'visible_student' : 'visible_guest')); |
|
650 | + $field = ($user == self::VISIBLE_TEACHER ? 'visible_teacher' : ($user == self::VISIBLE_STUDENT ? 'visible_student' : 'visible_guest')); |
|
651 | 651 | |
652 | - $sql = "UPDATE ".$db_table." SET ".$field." = '".$visible."' |
|
652 | + $sql = "UPDATE ".$db_table." SET ".$field." = '".$visible."' |
|
653 | 653 | WHERE id='".$announcement_id."'"; |
654 | - $res = Database::query($sql); |
|
655 | - |
|
656 | - if ($res === false) { |
|
657 | - return false; |
|
658 | - } |
|
659 | - |
|
660 | - return true; |
|
661 | - } |
|
662 | - |
|
663 | - /** |
|
664 | - * Send a system announcement by e-mail to all teachers/students depending on parameters |
|
665 | - * @param string $title |
|
666 | - * @param string $content |
|
667 | - * @param int $teacher Whether to send to all teachers (1) or not (0) |
|
668 | - * @param int $student Whether to send to all students (1) or not (0) |
|
669 | - * @param string $language Language (optional, considered for all languages if left empty) |
|
654 | + $res = Database::query($sql); |
|
655 | + |
|
656 | + if ($res === false) { |
|
657 | + return false; |
|
658 | + } |
|
659 | + |
|
660 | + return true; |
|
661 | + } |
|
662 | + |
|
663 | + /** |
|
664 | + * Send a system announcement by e-mail to all teachers/students depending on parameters |
|
665 | + * @param string $title |
|
666 | + * @param string $content |
|
667 | + * @param int $teacher Whether to send to all teachers (1) or not (0) |
|
668 | + * @param int $student Whether to send to all students (1) or not (0) |
|
669 | + * @param string $language Language (optional, considered for all languages if left empty) |
|
670 | 670 | * @param bool $sendEmailTest |
671 | 671 | * @return bool True if the message was sent or there was no destination matching. False on database or e-mail sending error. |
672 | - */ |
|
672 | + */ |
|
673 | 673 | public static function send_system_announcement_by_email( |
674 | 674 | $title, |
675 | 675 | $content, |
@@ -695,26 +695,26 @@ discard block |
||
695 | 695 | } |
696 | 696 | |
697 | 697 | if ($teacher <> 0 && $student == 0) { |
698 | - $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
698 | + $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
699 | 699 | WHERE status = '1' "; |
700 | - } |
|
700 | + } |
|
701 | 701 | |
702 | - if ($teacher == 0 && $student <> 0) { |
|
703 | - $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
702 | + if ($teacher == 0 && $student <> 0) { |
|
703 | + $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
704 | 704 | WHERE status = '5' "; |
705 | - } |
|
705 | + } |
|
706 | 706 | |
707 | - if ($teacher<> 0 && $student <> 0) { |
|
708 | - $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
707 | + if ($teacher<> 0 && $student <> 0) { |
|
708 | + $sql = "SELECT DISTINCT u.user_id FROM $user_table u $url_condition |
|
709 | 709 | WHERE 1 = 1 "; |
710 | - } |
|
710 | + } |
|
711 | 711 | |
712 | - if (!empty($language)) { |
|
713 | - //special condition because language was already treated for SQL insert before |
|
714 | - $sql .= " AND language = '".Database::escape_string($language)."' "; |
|
715 | - } |
|
712 | + if (!empty($language)) { |
|
713 | + //special condition because language was already treated for SQL insert before |
|
714 | + $sql .= " AND language = '".Database::escape_string($language)."' "; |
|
715 | + } |
|
716 | 716 | |
717 | - if (api_is_multiple_url_enabled()) { |
|
717 | + if (api_is_multiple_url_enabled()) { |
|
718 | 718 | $sql .= " AND access_url_id = '".$current_access_url_id."' "; |
719 | 719 | } |
720 | 720 | |
@@ -724,36 +724,36 @@ discard block |
||
724 | 724 | // Expiration date |
725 | 725 | $sql .= " AND (expiration_date = '' OR expiration_date IS NULL OR expiration_date > '$now') "; |
726 | 726 | |
727 | - if ((empty($teacher) || $teacher == '0') && (empty($student) || $student == '0')) { |
|
727 | + if ((empty($teacher) || $teacher == '0') && (empty($student) || $student == '0')) { |
|
728 | 728 | |
729 | - return true; |
|
730 | - } |
|
729 | + return true; |
|
730 | + } |
|
731 | 731 | |
732 | - $result = Database::query($sql); |
|
733 | - if ($result === false) { |
|
732 | + $result = Database::query($sql); |
|
733 | + if ($result === false) { |
|
734 | 734 | |
735 | - return false; |
|
736 | - } |
|
735 | + return false; |
|
736 | + } |
|
737 | 737 | |
738 | 738 | $message_sent = false; |
739 | 739 | |
740 | - while ($row = Database::fetch_array($result,'ASSOC')) { |
|
740 | + while ($row = Database::fetch_array($result,'ASSOC')) { |
|
741 | 741 | MessageManager::send_message_simple($row['user_id'], $title, $content); |
742 | 742 | $message_sent = true; |
743 | - } |
|
743 | + } |
|
744 | 744 | |
745 | 745 | // Minor validation to clean up the attachment files in the announcement |
746 | - if (!empty($_FILES)) { |
|
747 | - $attachments = $_FILES; |
|
748 | - foreach ($attachments as $attachment) { |
|
749 | - unlink($attachment['tmp_name']); |
|
750 | - } |
|
751 | - } |
|
746 | + if (!empty($_FILES)) { |
|
747 | + $attachments = $_FILES; |
|
748 | + foreach ($attachments as $attachment) { |
|
749 | + unlink($attachment['tmp_name']); |
|
750 | + } |
|
751 | + } |
|
752 | 752 | |
753 | - return $message_sent; //true if at least one e-mail was sent |
|
754 | - } |
|
753 | + return $message_sent; //true if at least one e-mail was sent |
|
754 | + } |
|
755 | 755 | |
756 | - /** |
|
756 | + /** |
|
757 | 757 | * Displays announcements as an slideshow |
758 | 758 | * @param int $visible VISIBLE_GUEST, VISIBLE_STUDENT or VISIBLE_TEACHER |
759 | 759 | * @param int $id The identifier of the announcement to display |
@@ -1377,11 +1377,11 @@ discard block |
||
1377 | 1377 | } |
1378 | 1378 | |
1379 | 1379 | $sql .= ' FROM ' . Database::get_main_table(TABLE_MAIN_USER) . ' as user ' |
1380 | - . ' LEFT JOIN ' . Database::get_main_table(TABLE_MAIN_COURSE_USER) . ' as course_rel_user |
|
1380 | + . ' LEFT JOIN ' . Database::get_main_table(TABLE_MAIN_COURSE_USER) . ' as course_rel_user |
|
1381 | 1381 | ON |
1382 | 1382 | user.id = course_rel_user.user_id AND |
1383 | 1383 | course_rel_user.relation_type <> ' . COURSE_RELATION_TYPE_RRHH . ' ' |
1384 | - . " INNER JOIN $course_table course ON course_rel_user.c_id = course.id "; |
|
1384 | + . " INNER JOIN $course_table course ON course_rel_user.c_id = course.id "; |
|
1385 | 1385 | |
1386 | 1386 | if (!empty($course_code)) { |
1387 | 1387 | $sql .= ' AND course_rel_user.c_id = "' . $courseId . '"'; |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | |
1726 | 1726 | // We get the coach for the given course in a given session. |
1727 | 1727 | $sql = 'SELECT user_id FROM ' . Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER) . |
1728 | - ' WHERE session_id ="' . $session_id . '" AND c_id="' . $courseId . '" AND status = 2'; |
|
1728 | + ' WHERE session_id ="' . $session_id . '" AND c_id="' . $courseId . '" AND status = 2'; |
|
1729 | 1729 | $rs = Database::query($sql); |
1730 | 1730 | while ($user = Database::fetch_array($rs)) { |
1731 | 1731 | $userInfo = api_get_user_info($user['user_id']); |
@@ -3503,13 +3503,13 @@ discard block |
||
3503 | 3503 | $params['edit_actions'] .= api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course['code']; |
3504 | 3504 | if ($load_dirs) { |
3505 | 3505 | $params['document'] = '<a id="document_preview_' . $courseId . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' |
3506 | - . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3506 | + . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3507 | 3507 | $params['document'] .= Display::div('', ['id' => 'document_result_' . $courseId . '_0', 'class' => 'document_preview_container']); |
3508 | 3508 | } |
3509 | 3509 | } else { |
3510 | 3510 | if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED && $load_dirs) { |
3511 | 3511 | $params['document'] = '<a id="document_preview_' . $courseId . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' |
3512 | - . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3512 | + . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3513 | 3513 | $params['document'] .= Display::div('', ['id' => 'document_result_' . $courseId . '_0', 'class' => 'document_preview_container']); |
3514 | 3514 | } |
3515 | 3515 | } |
@@ -3685,7 +3685,7 @@ discard block |
||
3685 | 3685 | $params['edit_actions'] .= api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course_info['code']; |
3686 | 3686 | if ($load_dirs) { |
3687 | 3687 | $params['document'] = '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' |
3688 | - . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3688 | + . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3689 | 3689 | $params['document'] .= Display::div('', array('id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container')); |
3690 | 3690 | } |
3691 | 3691 | } |
@@ -3812,7 +3812,7 @@ discard block |
||
3812 | 3812 | $params['edit_actions'] .= api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course_info['code']; |
3813 | 3813 | if($load_dirs){ |
3814 | 3814 | $params['document'] = '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' |
3815 | - . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3815 | + . Display::returnFontAwesomeIcon('folder-open') . '</a>'; |
|
3816 | 3816 | $params['document'] .= Display::div('', array('id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container')); |
3817 | 3817 | } |
3818 | 3818 | } |
@@ -4093,7 +4093,7 @@ discard block |
||
4093 | 4093 | } |
4094 | 4094 | |
4095 | 4095 | $session_title .= isset($course['special_course']) ? ' ' . |
4096 | - Display::return_icon('klipper.png', get_lang('CourseAutoRegister')) : ''; |
|
4096 | + Display::return_icon('klipper.png', get_lang('CourseAutoRegister')) : ''; |
|
4097 | 4097 | |
4098 | 4098 | $params['title'] = $session_title; |
4099 | 4099 | $params['extra'] = ''; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $exercise_id = 0, |
47 | 47 | $hotpotato_name = null |
48 | 48 | ) { |
49 | - $return = array(); |
|
49 | + $return = array(); |
|
50 | 50 | |
51 | 51 | $TBL_EXERCISES = Database::get_course_table(TABLE_QUIZ_TEST); |
52 | 52 | $TBL_TABLE_LP_MAIN = Database::get_course_table(TABLE_LP_MAIN); |
@@ -275,8 +275,8 @@ discard block |
||
275 | 275 | return true; |
276 | 276 | } |
277 | 277 | |
278 | - /** |
|
279 | - * Exports the complete report as a CSV file |
|
278 | + /** |
|
279 | + * Exports the complete report as a CSV file |
|
280 | 280 | * |
281 | 281 | * @param string $document_path Document path inside the document tool |
282 | 282 | * @param integer $user_id Optional user ID |
@@ -285,8 +285,8 @@ discard block |
||
285 | 285 | * @param int $exercise_id |
286 | 286 | * @param string $hotpotato_name |
287 | 287 | * |
288 | - * @return boolean False on error |
|
289 | - */ |
|
288 | + * @return boolean False on error |
|
289 | + */ |
|
290 | 290 | public function exportCompleteReportCSV( |
291 | 291 | $document_path = '', |
292 | 292 | $user_id = null, |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
189 | - * provides a side connection to a vchamilo database |
|
190 | - * @param array $_configuration |
|
189 | + * provides a side connection to a vchamilo database |
|
190 | + * @param array $_configuration |
|
191 | 191 | * |
192 | - * @return \Doctrine\DBAL\Driver\Connection |
|
193 | - */ |
|
192 | + * @return \Doctrine\DBAL\Driver\Connection |
|
193 | + */ |
|
194 | 194 | public static function bootConnection(&$_configuration) |
195 | 195 | { |
196 | 196 | $dbParams = array( |
@@ -298,10 +298,10 @@ discard block |
||
298 | 298 | } |
299 | 299 | |
300 | 300 | /** |
301 | - * drop a vchamilo instance databases using the physical connection |
|
302 | - * @param stdClass $params |
|
303 | - * return an array of errors or false if ok |
|
304 | - */ |
|
301 | + * drop a vchamilo instance databases using the physical connection |
|
302 | + * @param stdClass $params |
|
303 | + * return an array of errors or false if ok |
|
304 | + */ |
|
305 | 305 | public static function dropDatabase($params) |
306 | 306 | { |
307 | 307 | $params = clone $params; |
@@ -376,10 +376,10 @@ discard block |
||
376 | 376 | } |
377 | 377 | |
378 | 378 | /** |
379 | - * get a proper SQLdump command |
|
380 | - * @param object $vchamilodata the complete new host information |
|
381 | - * @return string the shell command |
|
382 | - */ |
|
379 | + * get a proper SQLdump command |
|
380 | + * @param object $vchamilodata the complete new host information |
|
381 | + * @return string the shell command |
|
382 | + */ |
|
383 | 383 | public static function getDatabaseDumpCmd($vchamilodata) |
384 | 384 | { |
385 | 385 | $pgm = self::getConfig('vchamilo', 'mysql_cmd'); |
@@ -536,8 +536,8 @@ discard block |
||
536 | 536 | } |
537 | 537 | |
538 | 538 | /** |
539 | - * read manifest values in vchamilo template. |
|
540 | - */ |
|
539 | + * read manifest values in vchamilo template. |
|
540 | + */ |
|
541 | 541 | public static function getVmanifest($version) |
542 | 542 | { |
543 | 543 | $templatewwwroot = ''; |
@@ -558,8 +558,8 @@ discard block |
||
558 | 558 | } |
559 | 559 | |
560 | 560 | /** |
561 | - * make a fake vchamilo that represents the current host |
|
562 | - */ |
|
561 | + * make a fake vchamilo that represents the current host |
|
562 | + */ |
|
563 | 563 | public static function makeThis() |
564 | 564 | { |
565 | 565 | global $_configuration; |
@@ -623,10 +623,10 @@ discard block |
||
623 | 623 | } |
624 | 624 | |
625 | 625 | /** |
626 | - * this function set will map standard moodle API calls to chamilo |
|
627 | - * internal primitives. This avoids too many changes to do in imported |
|
628 | - * code |
|
629 | - */ |
|
626 | + * this function set will map standard moodle API calls to chamilo |
|
627 | + * internal primitives. This avoids too many changes to do in imported |
|
628 | + * code |
|
629 | + */ |
|
630 | 630 | public static function getConfig($module, $key, $isplugin = true) |
631 | 631 | { |
632 | 632 | if ($isplugin) { |
@@ -205,7 +205,7 @@ |
||
205 | 205 | |
206 | 206 | // Show the chamilo mascot |
207 | 207 | if (empty($courseAndSessions['html']) && !isset($_GET['history'])) { |
208 | - $controller->tpl->assign('welcome_to_course_block', $controller->return_welcome_to_course_block()); |
|
208 | + $controller->tpl->assign('welcome_to_course_block', $controller->return_welcome_to_course_block()); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | $controller->tpl->assign('content', $courseAndSessions['html']); |