Browse Source

Minor - format code

Julio Montoya 6 years ago
parent
commit
17d9203a6a
2 changed files with 45 additions and 62 deletions
  1. 30 33
      main/mySpace/myStudents.php
  2. 15 29
      main/template/default/layout/layout_2_col.tpl

+ 30 - 33
main/mySpace/myStudents.php

@@ -100,52 +100,52 @@ if (!empty($details)) {
     if ($origin === 'user_course') {
         if (empty($cidReq)) {
             $interbreadcrumb[] = [
-                "url" => api_get_path(WEB_COURSE_PATH).$courseInfo['directory'],
+                'url' => api_get_path(WEB_COURSE_PATH).$courseInfo['directory'],
                 'name' => $courseInfo['title'],
             ];
         }
         $interbreadcrumb[] = [
-            "url" => "../user/user.php?cidReq=".$course_code,
-            "name" => get_lang("Users"),
+            'url' => "../user/user.php?cidReq=".$course_code,
+            'name' => get_lang("Users"),
         ];
     } else {
         if ($origin === 'tracking_course') {
             $interbreadcrumb[] = [
-                "url" => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session='.api_get_session_id(),
-                "name" => get_lang("Tracking"),
+                'url' => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session='.api_get_session_id(),
+                'name' => get_lang("Tracking"),
             ];
         } else {
             if ($origin === 'resume_session') {
                 $interbreadcrumb[] = [
                     'url' => "../session/session_list.php",
-                    "name" => get_lang('SessionList'),
+                    'name' => get_lang('SessionList'),
                 ];
                 $interbreadcrumb[] = [
                     'url' => "../session/resume_session.php?id_session=".$sessionId,
-                    "name" => get_lang('SessionOverview'),
+                    'name' => get_lang('SessionOverview'),
                 ];
             } else {
                 $interbreadcrumb[] = [
-                    "url" => api_is_student_boss() ? "#" : "index.php",
-                    "name" => get_lang('MySpace'),
+                    'url' => api_is_student_boss() ? "#" : "index.php",
+                    'name' => get_lang('MySpace'),
                 ];
                 if (!empty($coachId)) {
                     $interbreadcrumb[] = [
-                        "url" => "student.php?id_coach=".$coachId,
-                        "name" => get_lang("CoachStudents"),
+                        'url' => "student.php?id_coach=".$coachId,
+                        'name' => get_lang("CoachStudents"),
                     ];
                     $interbreadcrumb[] = [
-                        "url" => "myStudents.php?student=".$student_id.'&id_coach='.$coachId,
-                        "name" => get_lang("StudentDetails"),
+                        'url' => "myStudents.php?student=".$student_id.'&id_coach='.$coachId,
+                        'name' => get_lang("StudentDetails"),
                     ];
                 } else {
                     $interbreadcrumb[] = [
-                        "url" => "student.php",
-                        "name" => get_lang('MyStudents'),
+                        'url' => "student.php",
+                        'name' => get_lang('MyStudents'),
                     ];
                     $interbreadcrumb[] = [
-                        "url" => "myStudents.php?student=".$student_id,
-                        "name" => get_lang('StudentDetails'),
+                        'url' => "myStudents.php?student=".$student_id,
+                        'name' => get_lang('StudentDetails'),
                     ];
                 }
             }
@@ -156,40 +156,40 @@ if (!empty($details)) {
     if ($origin == 'resume_session') {
         $interbreadcrumb[] = [
             'url' => "../session/session_list.php",
-            "name" => get_lang('SessionList'),
+            'name' => get_lang('SessionList'),
         ];
         if (!empty($sessionId)) {
             $interbreadcrumb[] = [
                 'url' => "../session/resume_session.php?id_session=".$sessionId,
-                "name" => get_lang('SessionOverview'),
+                'name' => get_lang('SessionOverview'),
             ];
         }
     } elseif ($origin === 'teacher_details') {
         $this_section = SECTION_TRACKING;
-        $interbreadcrumb[] = ["url" => "index.php", "name" => get_lang('MySpace')];
-        $interbreadcrumb[] = ["url" => "teachers.php", "name" => get_lang('Teachers')];
+        $interbreadcrumb[] = ['url' => "index.php", 'name' => get_lang('MySpace')];
+        $interbreadcrumb[] = ['url' => "teachers.php", 'name' => get_lang('Teachers')];
         $nameTools = $user_info['complete_name'];
     } else {
         $interbreadcrumb[] = [
-            "url" => api_is_student_boss() ? "#" : "index.php",
-            "name" => get_lang('MySpace'),
+            'url' => api_is_student_boss() ? "#" : "index.php",
+            'name' => get_lang('MySpace'),
         ];
         if (!empty($coachId)) {
             if ($sessionId) {
                 $interbreadcrumb[] = [
-                    "url" => "student.php?id_coach=".$coachId."&id_session=".$sessionId,
-                    "name" => get_lang("CoachStudents"),
+                    'url' => "student.php?id_coach=".$coachId."&id_session=".$sessionId,
+                    'name' => get_lang("CoachStudents"),
                 ];
             } else {
                 $interbreadcrumb[] = [
-                    "url" => "student.php?id_coach=".$coachId,
-                    "name" => get_lang("CoachStudents"),
+                    'url' => "student.php?id_coach=".$coachId,
+                    'name' => get_lang("CoachStudents"),
                 ];
             }
         } else {
             $interbreadcrumb[] = [
-                "url" => "student.php",
-                "name" => get_lang("MyStudents"),
+                'url' => "student.php",
+                'name' => get_lang("MyStudents"),
             ];
         }
     }
@@ -231,9 +231,7 @@ switch ($action) {
         if ($allowMessages === true) {
             $subject = isset($_POST['subject']) ? $_POST['subject'] : '';
             $message = isset($_POST['message']) ? $_POST['message'] : '';
-
             $currentUserInfo = api_get_user_info();
-
             MessageManager::sendMessageAboutUser(
                 $user_info,
                 $currentUserInfo,
@@ -1781,11 +1779,11 @@ if ($allowAll) {
         $sessionId
     );
 }
+
 if ($allowMessages === true) {
     // Messages
     echo Display::page_subheader2(get_lang('Messages'));
     echo MessageManager::getMessagesAboutUserToString($user_info);
-
     echo Display::url(
         get_lang('NewMessage'),
         'javascript: void(0);',
@@ -1812,7 +1810,6 @@ if ($allowMessages === true) {
 $allow = api_get_configuration_value('allow_user_message_tracking');
 if ($allow && (api_is_drh() || api_is_platform_admin())) {
     $users = MessageManager::getUsersThatHadConversationWithUser($student_id);
-
     echo Display::page_subheader2(get_lang('MessageTracking'));
 
     $table = new HTML_Table(['class' => 'table']);

+ 15 - 29
main/template/default/layout/layout_2_col.tpl

@@ -1,5 +1,4 @@
 {% extends 'layout/page.tpl'|get_template %}
-
 {% import 'macro/macro.tpl'|get_template as display %}
 
 {% block body %}
@@ -58,15 +57,8 @@
                         {{ course_category_block }}
                     </article>
                 {% endif %}
-
-                
-
-                    {% include 'layout/hot_courses.tpl'|get_template %}
-
-                    {% include 'session/sessions_current.tpl'|get_template %}
-
-                
-
+                {% include 'layout/hot_courses.tpl'|get_template %}
+                {% include 'session/sessions_current.tpl'|get_template %}
                 {% if plugin_content_bottom %}
                     <div id="plugin_content_bottom">
                         {{ plugin_content_bottom }}
@@ -76,7 +68,6 @@
         </div>
         <div class="col-md-3 col-md-pull-9">
             <div class="sidebar">
-
                 {% if plugin_menu_top %}
                     {{ display.pluginSidebar('sidebar-top', plugin_menu_top) }}
                 {% endif %}
@@ -89,17 +80,17 @@
 
                 <!-- BLOCK PROFILE -->
                 {% if profile_block %}
-                    {{ display.collapseMenu('profile' , 'Profile'|get_lang, profile_block) }}
+                    {{ display.collapseMenu('profile', 'Profile'|get_lang, profile_block) }}
                 {% endif %}
 
                 <!-- BLOCK COURSE -->
                 {% if course_block %}
-                    {{ display.collapseMenu('courses' , 'Courses'|get_lang, course_block) }}
+                    {{ display.collapseMenu('courses', 'Courses'|get_lang, course_block) }}
                 {% endif %}
 
                 <!-- BLOCK SKILLS -->
                 {% if skills_block %}
-                    {{ display.collapseMenu('skills' , 'Skills'|get_lang, skills_block) }}
+                    {{ display.collapseMenu('skills', 'Skills'|get_lang, skills_block) }}
                 {% endif %}
 
                 {% if grade_book_sidebar %}
@@ -107,7 +98,11 @@
                     <div class="panel panel-default" id="gradebook_block">
                         <div class="panel-heading" role="tab">
                             <h4 class="panel-title">
-                                <a role="button" data-toggle="collapse" data-parent="#skill" href="#skillCollapse" aria-expanded="true" aria-controls="skillCollapse">
+                                <a role="button" data-toggle="collapse"
+                                   data-parent="#skill"
+                                   href="#skillCollapse"
+                                   aria-expanded="true"
+                                   aria-controls="skillCollapse">
                                     {{ 'Gradebook' | get_lang }}
                                 </a>
                             </h4>
@@ -124,16 +119,14 @@
                                                 {% if badge.finished %}
                                                     <img class="badge_sidebar_image " src ="{{ skill.icon_big }}" />
                                                 {% else %}
-                                                    <img class="badge_sidebar_image badge_sidebar_image_transparency" src = "{{ skill.icon_big }}" />
+                                                    <img class="badge_sidebar_image badge_sidebar_image_transparency"
+                                                         src = "{{ skill.icon_big }}" />
                                                 {% endif %}
                                                 <div class="badge_sidebar_title">
                                                 {{ skill.name }}
                                                 </div>
                                             {% endfor %}
                                             </div>
-                                            {#<div class="badge_sidebar_title">#}
-                                            {#{{ badge.name }}#}
-                                            {#</div>#}
                                         {% endfor %}
                                     </li>
                                 </ul>
@@ -141,33 +134,26 @@
                         </div>
                     </div>
                 </div>
-
                 {% endif %}
                 {{ certificates_search_block }}
-
                 <!-- BLOCK NOTICE -->
                 {% if notice_block %}
-                    {{ display.collapse('notice' , 'Notice'|get_lang, notice_block) }}
+                    {{ display.collapse('notice', 'Notice'|get_lang, notice_block) }}
                 {% endif %}
-
                 <!-- BLOCK HELP -->
                 {% if help_block %}
-                    {{ display.collapse('help' , 'MenuGeneral'|get_lang, help_block, true) }}
+                    {{ display.collapse('help', 'MenuGeneral'|get_lang, help_block, true) }}
                 {% endif %}
-
                 <!-- BLOCK LINKS NAVIGATION -->
                 {% if navigation_links %}
-                    {{ display.collapseFor('navigation_sidebar' , 'MainNavigation'|get_lang, navigation_links) }}
+                    {{ display.collapseFor('navigation_sidebar', 'MainNavigation'|get_lang, navigation_links) }}
                 {% endif %}
-
-
                 {{ search_block }}
                 {{ classes_block }}
 
                 {% if plugin_menu_bottom %}
                     {{ display.pluginSidebar('sidebar-bottom', plugin_menu_bottom) }}
                 {% endif %}
-
             </div>
         </div>
     </div>