d789a71570731959352692c727c8c5c4b5c32ea5
[atutor.git] / mods / atutor_opencaps / include / classes / ATOC_Debug.php
1 <?php\r
2 /****************************************************************/\r
3 /* Atutor-OpenCaps Module                                               \r
4 /****************************************************************/\r
5 /* Copyright (c) 2010                           \r
6 /* Written by Antonio Gamba                                             \r
7 /* Adaptive Technology Resource Centre / University of Toronto\r
8 /*\r
9 /* This program is free software. You can redistribute it and/or\r
10 /* modify it under the terms of the GNU General Public License\r
11 /* as published by the Free Software Foundation.\r
12 /****************************************************************/\r
13 \r
14 class AtOpenCapsDebug\r
15 {\r
16 \r
17         /**\r
18          * Static function: shows AT session and cookie variables \r
19          */\r
20         static public function _seeAlSessionVars()\r
21         {\r
22                 // trace $_SESSION\r
23                 \r
24                 if (count($_SESSION) == 0)\r
25                 {\r
26                  echo '<br/> Noting in $_SESSION ';\r
27                 } else {\r
28                 \r
29                 echo '<h3>Displaying PHP $_SESSION and $_COOKIE variables</h3>';\r
30                 echo '<br/><p>$_SESSION vars</p>';\r
31                         while ($var = each($_SESSION))\r
32                     {\r
33                             printf ("Key <b>%s</b> = <b>%s</b><br>", $var['key'], $var['value']);\r
34                     } \r
35                 }\r
36                 \r
37                 if (count($_COOKIE) == 0)\r
38                 {\r
39                  echo '<br/> No cookies set';\r
40                 } else {\r
41                 \r
42                 echo '<br/><br/><p>$_COOKIE vars</p>';\r
43                 while ($var1 = each($_COOKIE))\r
44                     {\r
45                     printf ("Key <b>%s</b> = <b>%s</b><br>", $var1['key'], $var1['value']);\r
46                     } \r
47                 }\r
48                 echo '<br/><br/>';\r
49         } // end _seeAlSessionVars\r
50         \r
51 } // end AtOpenCapsDebug class\r
52 ?>