Browse Source

Fixing PHP warnings

Julio Montoya 12 years ago
parent
commit
5d6b40d239
2 changed files with 15 additions and 23 deletions
  1. 15 15
      main/exercice/exercice.php
  2. 0 8
      main/inc/lib/sessionmanager.lib.php

+ 15 - 15
main/exercice/exercice.php

@@ -162,19 +162,19 @@ $htmlHeadXtra[] = '<script>
                 hide: true, //
             });
         });*/
-
-     /*$(".data_table tbody").sortable({
-        cursor: "move", // works?
-        update: function(event, ui) {
-            var order = $(this).sortable("serialize") + "&a=update_exercise_list_order";
-            $.get("'.api_get_path(WEB_AJAX_PATH).'exercise.ajax.php", order, function(reponse) {
-                $("#message").html(reponse);
-            });
-        },
-        axis: "y",
-        placeholder: "ui-state-highlight", //defines the yellow highlight
-        handle: ".moved", //only the class "moved"
-    });*/
+        /*
+        $(".data_table tbody").sortable({
+            cursor: "move", // works?
+            update: function(event, ui) {
+                var order = $(this).sortable("serialize") + "&a=update_exercise_list_order";
+                $.get("'.api_get_path(WEB_AJAX_PATH).'exercise.ajax.php", order, function(reponse) {
+                    $("#message").html(reponse);
+                });
+            },
+            axis: "y",
+            placeholder: "ui-state-highlight", //defines the yellow highlight
+            handle: ".moved", //only the class "moved"
+        }); */
 });
 </script>';
 
@@ -330,7 +330,7 @@ if ($is_allowedToEdit) {
 } else {
     // Only for students
     $total_sql = "SELECT count(id) as count FROM $TBL_EXERCICES WHERE c_id = $course_id AND active = '1' $condition_session ";
-    $sql = "SELECT id, title, type, description, results_disabled, session_id, start_time, end_time, max_attempt FROM $TBL_EXERCICES
+    $sql = "SELECT * FROM $TBL_EXERCICES
             WHERE c_id = $course_id AND
                   active='1' $condition_session
             ORDER BY title LIMIT ".$from.",".$limit;
@@ -386,6 +386,7 @@ if ($is_allowedToEdit && $origin != 'learnpath') {
 
 if ($is_allowedToEdit) {
     echo '</div>'; // closing the actions div
+    //echo '<div id="message"></div>';
 }
 
 if ($total > $limit) {
@@ -407,7 +408,6 @@ if ($total > $limit) {
 }
 
 $i = 1;
-$lis = '';
 
 $online_icon = Display::return_icon('online.png', get_lang('Visible'), array('width' => '12px'));
 $offline_icon = Display::return_icon('offline.png', get_lang('Invisible'), array('width' => '12px'));

+ 0 - 8
main/inc/lib/sessionmanager.lib.php

@@ -621,7 +621,6 @@ class SessionManager {
 		}
 
 		if ($send_email) {
-		    //global $_configuration;
 			//sending emails only
 			if (is_array($user_list) && count($user_list)>0) {
 				foreach ($user_list as $user_id) {
@@ -630,13 +629,6 @@ class SessionManager {
                         $user_info = api_get_user_info($user_id);
                         $content	= get_lang('Dear')." ".stripslashes($user_info['complete_name']).",\n\n".sprintf(get_lang('YouAreRegisterToSessionX'), $session_name) ." \n\n" .get_lang('Address') ." ". get_setting('siteName') ." ". get_lang('Is') ." : ". api_get_path(WEB_PATH) ."\n\n". get_lang('Problem'). "\n\n". get_lang('Formula').",\n\n".get_setting('administratorName')." ".get_setting('administratorSurname')."\n". get_lang('Manager'). " ".get_setting('siteName')."\nT. ".get_setting('administratorTelephone')."\n" .get_lang('Email') ." : ".get_setting('emailAdministrator');
                         MessageManager::send_message($user_id, $subject, $content, array(), array(), null, null, null, null, null);
-
-					    /*$emailheaders = 'From: '.get_setting('administratorName').' '.get_setting('administratorSurname').' <'.get_setting('emailAdministrator').">\n";
-					    $emailheaders .= 'Reply-To: '.get_setting('emailAdministrator');
-
-					    $emailbody	= get_lang('Dear')." ".stripslashes(api_get_person_name($firstname, $lastname)).",\n\n".sprintf(get_lang('YouAreRegisterToSessionX'), $session_name) ." \n\n" .get_lang('Address') ." ". get_setting('siteName') ." ". get_lang('Is') ." : ". api_get_path(WEB_PATH) ."\n\n". get_lang('Problem'). "\n\n". get_lang('Formula').",\n\n".get_setting('administratorName')." ".get_setting('administratorSurname')."\n". get_lang('Manager'). " ".get_setting('siteName')."\nT. ".get_setting('administratorTelephone')."\n" .get_lang('Email') ." : ".get_setting('emailAdministrator');
-
-					    @api_send_mail($emailto, $emailsubject, $emailbody, $emailheaders);*/
 					}
 				}
 			}