Minor - format code

1.10.x
Julio 10 years ago
parent 8b97be2b56
commit d25e306f9e
  1. 60
      app/Migrations/Schema/V110/Version20151101082300.php
  2. 9
      main/exercice/hotpotatoes.php

@ -46,11 +46,8 @@ class Version20151101082300 extends AbstractMigrationChamilo
$courseType->getColumn('id')->setUnsigned(false); $courseType->getColumn('id')->setUnsigned(false);
$schema->getTable('c_announcement')->addIndex(['c_id']); $schema->getTable('c_announcement')->addIndex(['c_id']);
$schema->getTable('c_announcement_attachment')->addIndex(['c_id']); $schema->getTable('c_announcement_attachment')->addIndex(['c_id']);
$schema->getTable('c_attendance')->addIndex(['c_id']); $schema->getTable('c_attendance')->addIndex(['c_id']);
$schema->getTable('c_attendance_calendar')->addIndex(['c_id']); $schema->getTable('c_attendance_calendar')->addIndex(['c_id']);
$cAttendanceCalendarRelGroup = $schema->getTable('c_attendance_calendar_rel_group'); $cAttendanceCalendarRelGroup = $schema->getTable('c_attendance_calendar_rel_group');
@ -64,15 +61,10 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cAttendanceSheet->addIndex(['user_id']); $cAttendanceSheet->addIndex(['user_id']);
$schema->getTable('c_attendance_sheet_log')->addIndex(['c_id']); $schema->getTable('c_attendance_sheet_log')->addIndex(['c_id']);
$schema->getTable('c_blog')->addIndex(['c_id']); $schema->getTable('c_blog')->addIndex(['c_id']);
$schema->getTable('c_blog_attachment')->addIndex(['c_id']); $schema->getTable('c_blog_attachment')->addIndex(['c_id']);
$schema->getTable('c_blog_comment')->addIndex(['c_id']); $schema->getTable('c_blog_comment')->addIndex(['c_id']);
$schema->getTable('c_blog_post')->addIndex(['c_id']); $schema->getTable('c_blog_post')->addIndex(['c_id']);
$schema->getTable('c_blog_rating')->addIndex(['c_id']); $schema->getTable('c_blog_rating')->addIndex(['c_id']);
$cBlogRelUser = $schema->getTable('c_blog_rel_user'); $cBlogRelUser = $schema->getTable('c_blog_rel_user');
@ -94,9 +86,7 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cCalendarEvent->addIndex(['c_id']); $cCalendarEvent->addIndex(['c_id']);
$schema->getTable('c_calendar_event_attachment')->addIndex(['c_id']); $schema->getTable('c_calendar_event_attachment')->addIndex(['c_id']);
$schema->getTable('c_calendar_event_repeat')->addIndex(['c_id']); $schema->getTable('c_calendar_event_repeat')->addIndex(['c_id']);
$schema->getTable('c_calendar_event_repeat_not')->addIndex(['c_id']); $schema->getTable('c_calendar_event_repeat_not')->addIndex(['c_id']);
$cChatConnected = $schema->getTable('c_chat_connected'); $cChatConnected = $schema->getTable('c_chat_connected');
@ -104,13 +94,9 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cChatConnected->addIndex(['user_id']); $cChatConnected->addIndex(['user_id']);
$schema->getTable('c_course_setting')->addIndex(['c_id']); $schema->getTable('c_course_setting')->addIndex(['c_id']);
$schema->getTable('c_document')->addIndex(['c_id']); $schema->getTable('c_document')->addIndex(['c_id']);
$schema->getTable('c_dropbox_category')->addIndex(['c_id']); $schema->getTable('c_dropbox_category')->addIndex(['c_id']);
$schema->getTable('c_dropbox_feedback')->addIndex(['c_id']); $schema->getTable('c_dropbox_feedback')->addIndex(['c_id']);
$schema->getTable('c_dropbox_file')->addIndex(['c_id']); $schema->getTable('c_dropbox_file')->addIndex(['c_id']);
$cDropboxPerson = $schema->getTable('c_dropbox_person'); $cDropboxPerson = $schema->getTable('c_dropbox_person');
@ -122,9 +108,7 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cDropboxPost->addIndex(['dest_user_id']); $cDropboxPost->addIndex(['dest_user_id']);
$schema->getTable('c_forum_attachment')->addIndex(['c_id']); $schema->getTable('c_forum_attachment')->addIndex(['c_id']);
$schema->getTable('c_forum_category')->addIndex(['c_id']); $schema->getTable('c_forum_category')->addIndex(['c_id']);
$schema->getTable('c_forum_forum')->addIndex(['c_id']); $schema->getTable('c_forum_forum')->addIndex(['c_id']);
$cForumMailcue = $schema->getTable('c_forum_mailcue'); $cForumMailcue = $schema->getTable('c_forum_mailcue');
@ -139,63 +123,35 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cForumNotification->addIndex(['post_id']); $cForumNotification->addIndex(['post_id']);
$schema->getTable('c_forum_post')->addIndex(['c_id']); $schema->getTable('c_forum_post')->addIndex(['c_id']);
$schema->getTable('c_forum_thread')->addIndex(['c_id']); $schema->getTable('c_forum_thread')->addIndex(['c_id']);
$schema->getTable('c_forum_thread_qualify')->addIndex(['c_id']); $schema->getTable('c_forum_thread_qualify')->addIndex(['c_id']);
$schema->getTable('c_forum_thread_qualify_log')->addIndex(['c_id']); $schema->getTable('c_forum_thread_qualify_log')->addIndex(['c_id']);
$schema->getTable('c_glossary')->addIndex(['c_id']); $schema->getTable('c_glossary')->addIndex(['c_id']);
$schema->getTable('c_group_category')->addIndex(['c_id']); $schema->getTable('c_group_category')->addIndex(['c_id']);
$schema->getTable('c_group_info')->addIndex(['c_id']); $schema->getTable('c_group_info')->addIndex(['c_id']);
$schema->getTable('c_group_rel_tutor')->addIndex(['c_id']); $schema->getTable('c_group_rel_tutor')->addIndex(['c_id']);
$schema->getTable('c_group_rel_user')->addIndex(['c_id']); $schema->getTable('c_group_rel_user')->addIndex(['c_id']);
$schema->getTable('c_link')->addIndex(['c_id']); $schema->getTable('c_link')->addIndex(['c_id']);
$schema->getTable('c_link_category')->addIndex(['c_id']); $schema->getTable('c_link_category')->addIndex(['c_id']);
$schema->getTable('c_lp')->addIndex(['c_id']); $schema->getTable('c_lp')->addIndex(['c_id']);
$schema->getTable('c_lp_category')->addIndex(['c_id']); $schema->getTable('c_lp_category')->addIndex(['c_id']);
$schema->getTable('c_lp_item')->addIndex(['c_id']); $schema->getTable('c_lp_item')->addIndex(['c_id']);
$schema->getTable('c_lp_item_view')->addIndex(['c_id']); $schema->getTable('c_lp_item_view')->addIndex(['c_id']);
$schema->getTable('c_lp_iv_interaction')->addIndex(['c_id']); $schema->getTable('c_lp_iv_interaction')->addIndex(['c_id']);
$schema->getTable('c_lp_iv_objective')->addIndex(['c_id']); $schema->getTable('c_lp_iv_objective')->addIndex(['c_id']);
$schema->getTable('c_lp_view')->addIndex(['c_id']); $schema->getTable('c_lp_view')->addIndex(['c_id']);
$schema->getTable('c_notebook')->addIndex(['c_id']); $schema->getTable('c_notebook')->addIndex(['c_id']);
$schema->getTable('c_online_connected')->addIndex(['c_id']); $schema->getTable('c_online_connected')->addIndex(['c_id']);
$schema->getTable('c_online_link')->addIndex(['c_id']); $schema->getTable('c_online_link')->addIndex(['c_id']);
$schema->getTable('c_permission_group')->addIndex(['c_id']); $schema->getTable('c_permission_group')->addIndex(['c_id']);
$schema->getTable('c_permission_task')->addIndex(['c_id']); $schema->getTable('c_permission_task')->addIndex(['c_id']);
$schema->getTable('c_permission_user')->addIndex(['c_id']); $schema->getTable('c_permission_user')->addIndex(['c_id']);
$schema->getTable('c_quiz')->addIndex(['c_id']); $schema->getTable('c_quiz')->addIndex(['c_id']);
$schema->getTable('c_quiz_answer')->addIndex(['c_id']); $schema->getTable('c_quiz_answer')->addIndex(['c_id']);
$schema->getTable('c_quiz_question')->addIndex(['c_id']); $schema->getTable('c_quiz_question')->addIndex(['c_id']);
$schema->getTable('c_quiz_question_category')->addIndex(['c_id']); $schema->getTable('c_quiz_question_category')->addIndex(['c_id']);
$schema->getTable('c_quiz_question_option')->addIndex(['c_id']); $schema->getTable('c_quiz_question_option')->addIndex(['c_id']);
$schema->getTable('c_quiz_question_rel_category')->addIndex(['c_id']); $schema->getTable('c_quiz_question_rel_category')->addIndex(['c_id']);
$cQuizRelQuestion = $schema->getTable('c_quiz_rel_question'); $cQuizRelQuestion = $schema->getTable('c_quiz_rel_question');
@ -220,7 +176,6 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cRoleUser->addIndex(['user_id']); $cRoleUser->addIndex(['user_id']);
$schema->getTable('c_student_publication')->addIndex(['c_id']); $schema->getTable('c_student_publication')->addIndex(['c_id']);
$schema->getTable('c_student_publication_assignment')->addIndex(['c_id']); $schema->getTable('c_student_publication_assignment')->addIndex(['c_id']);
$cStudentPublicationComment = $schema->getTable('c_student_publication_comment'); $cStudentPublicationComment = $schema->getTable('c_student_publication_comment');
@ -239,35 +194,20 @@ class Version20151101082300 extends AbstractMigrationChamilo
$cStudentPublicationComment->addIndex(['user_id']); $cStudentPublicationComment->addIndex(['user_id']);
$schema->getTable('c_survey')->addIndex(['c_id']); $schema->getTable('c_survey')->addIndex(['c_id']);
$schema->getTable('c_survey_answer')->addIndex(['c_id']); $schema->getTable('c_survey_answer')->addIndex(['c_id']);
$schema->getTable('c_survey_group')->addIndex(['c_id']); $schema->getTable('c_survey_group')->addIndex(['c_id']);
$schema->getTable('c_survey_invitation')->addIndex(['c_id']); $schema->getTable('c_survey_invitation')->addIndex(['c_id']);
$schema->getTable('c_survey_question')->addIndex(['c_id']); $schema->getTable('c_survey_question')->addIndex(['c_id']);
$schema->getTable('c_survey_question_option')->addIndex(['c_id']); $schema->getTable('c_survey_question_option')->addIndex(['c_id']);
$schema->getTable('c_thematic')->addIndex(['c_id']); $schema->getTable('c_thematic')->addIndex(['c_id']);
$schema->getTable('c_thematic_advance')->addIndex(['c_id']); $schema->getTable('c_thematic_advance')->addIndex(['c_id']);
$schema->getTable('c_thematic_plan')->addIndex(['c_id']); $schema->getTable('c_thematic_plan')->addIndex(['c_id']);
$schema->getTable('c_tool')->addIndex(['c_id']); $schema->getTable('c_tool')->addIndex(['c_id']);
$schema->getTable('c_tool_intro')->addIndex(['c_id']); $schema->getTable('c_tool_intro')->addIndex(['c_id']);
$schema->getTable('c_userinfo_content')->addIndex(['c_id']); $schema->getTable('c_userinfo_content')->addIndex(['c_id']);
$schema->getTable('c_userinfo_def')->addIndex(['c_id']); $schema->getTable('c_userinfo_def')->addIndex(['c_id']);
$schema->getTable('c_wiki')->addIndex(['c_id']); $schema->getTable('c_wiki')->addIndex(['c_id']);
$schema->getTable('c_wiki_conf')->addIndex(['c_id']); $schema->getTable('c_wiki_conf')->addIndex(['c_id']);
$schema->getTable('c_wiki_discuss')->addIndex(['c_id']); $schema->getTable('c_wiki_discuss')->addIndex(['c_id']);
$cWikiMailcue = $schema->getTable('c_wiki_mailcue'); $cWikiMailcue = $schema->getTable('c_wiki_mailcue');

@ -1,5 +1,6 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* Code for HotPotatoes integration. * Code for HotPotatoes integration.
* @package chamilo.exercise * @package chamilo.exercise
@ -11,6 +12,7 @@ require_once 'hotpotatoes.lib.php';
// Section (for the tabs). // Section (for the tabs).
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
$_course = api_get_course_info();
// Access restriction: only teachers are allowed here. // Access restriction: only teachers are allowed here.
if (!api_is_allowed_to_edit(null, true)) { if (!api_is_allowed_to_edit(null, true)) {
@ -28,12 +30,15 @@ if (!empty($gradebook) && $gradebook == 'view') {
); );
} }
// The breadcrumbs. // The breadcrumbs.
$interbreadcrumb[] = array('url' => './exercise.php', 'name' => get_lang('Exercises')); $interbreadcrumb[] = array(
'url' => api_get_path(WEB_CODE_PATH) . '.exercice/exercise.php?' . api_get_cidreq(),
'name' => get_lang('Exercises')
);
$is_allowedToEdit = api_is_allowed_to_edit(null, true); $is_allowedToEdit = api_is_allowed_to_edit(null, true);
// Database table definitions. // Database table definitions.
$dbTable = Database::get_course_table(TABLE_DOCUMENT); $dbTable = Database::get_course_table(TABLE_DOCUMENT);
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
// Setting some variables. // Setting some variables.

Loading…
Cancel
Save