changed git call from https to git readonly
[atutor.git] / mods / atutor_opencaps / opencaps / include / classes / system_OcAtutor_class.php
1 <?php\r
2 /****************************************************************/\r
3 /* 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 OcAtutor\r
15 {\r
16         public static function putCaps($uri, $action, $id, $ccData)\r
17         {\r
18                 if ($ccData!='The format of source Caption was not recognized.')\r
19                 {\r
20                         //$uri = '../../service.php?';\r
21                         $uri .= '?';\r
22                         $ch = curl_init($uri);\r
23                         $encoded = 'id='.$id.'&action='.$action.'&cc='.''.urlencode($ccData).'';\r
24                         curl_setopt($ch, CURLOPT_POSTFIELDS,  $encoded);\r
25                         curl_setopt($ch, CURLOPT_HEADER, 0);\r
26                         curl_setopt($ch, CURLOPT_POST, 1);\r
27                         curl_exec($ch);\r
28                         curl_close($ch);\r
29                         if(OC_DEBUG_MODE_ON)\r
30                         {\r
31                                 echo '<br/> Encoded Data sent to Server:<br/> '.$encoded.'<br/>';\r
32                         }\r
33                 } // end putCaps\r
34         \r
35         } // end class\r
36 }\r
37 ?>