Skip to content

Commit

Permalink
support for fast loading and cron improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhunt committed Jan 20, 2019
1 parent 7886d74 commit 521ecdf
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Change List
=========

Version 1.4.07 (Build 2019012000)
-Added better cron calling
-Added Poodll loader.html for cloudpoodll

Version 1.4.06(Build 2018120500)
-Fixed bug when presets dir contained a directory.

Expand Down
20 changes: 10 additions & 10 deletions classes/generico_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ public static function fetch_token($apiuser, $apisecret)
}

// Send the request & save response to $resp
$token_url ="https://cloud.poodll.com/local/cpapi/poodlltoken.php?username=$apiuser&password=$apisecret&service=cloud_poodll";
$token_response = self::curl_fetch($token_url);
$token_url ="https://cloud.poodll.com/local/cpapi/poodlltoken.php";
$postdata=array('username'=>$apiuser,'password'=>$apisecret,'service'=>'cloud_poodll');
$token_response = self::curl_fetch($token_url,$postdata);
if ($token_response) {
$resp_object = json_decode($token_response);
if($resp_object && property_exists($resp_object,'token')) {
Expand Down Expand Up @@ -202,13 +203,12 @@ public static function fetch_token($apiuser, $apisecret)

//we use curl to fetch transcripts from AWS and Tokens from cloudpoodll
//this is our helper
public static function curl_fetch($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
$data = curl_exec($curl);
curl_close($curl);
return $data;
public static function curl_fetch($url,$postdata){
global $CFG;
require_once($CFG->libdir.'/filelib.php');
$curl = new \curl();

$result = $curl->get($url, $postdata);
return $result;
}
}
36 changes: 36 additions & 0 deletions poodllloader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<meta http-equiv=”Pragma” content=”no-cache”>
<meta http-equiv=”Expires” content=”-1″>
<meta http-equiv=”CACHE-CONTROL” content=”NO-CACHE”>

<head>
<title>Poodll Recorder</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="https://cloud.poodll.com/local/cpapi/cloudstyles.css?v=021">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script type="text/javascript" src="https://cloud.poodll.com/local/cpapi/fastpoodllconfig.js?v=001"></script>
<script type="text/javascript" src="https://cloud.poodll.com/local/cpapi/lib/requirejs/require.js"></script>
<script type="text/javascript" src="https://cloud.poodll.com/local/cpapi/poodllloader.min.js?v=001"></script>


<style type="text/css">
/* BMR video recorder */
#AUTOID, .iframe-bmr{
max-width: 410px;
}
#AUTOID .poodll_mediarecorderbox_bmr{
width: auto !important;
}
#AUTOID, .iframe-bmr, #settingsicon_filter_poodll_controlbar_AUTOID{
bottom: 0px;
right: 0px;
}
/*end*/
</style>
</head>
<body>
<div id="AUTOID"></div>
<!-- <input type="text" id="theupdatecontrol"/> -->
</body>
</html>
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2018120500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019012000; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011070100; // Requires this Moodle version
$plugin->component = 'filter_generico'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'Version 1.4.06(Build 2018120500)';
$plugin->release = 'Version 1.4.07(Build 2019012000)';

0 comments on commit 521ecdf

Please sign in to comment.