This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import the useful packages | |
const crypto = require('crypto'); | |
const sha256 = require('sha256'); | |
// defining the variables | |
let nonce = crypto.randomBytes(16).toString('base64'); | |
let key = sha256.x2(WALLET_ID + WALLET_PASSWORD); // to double hash | |
let msg = WALLET_ID + nonce; | |
let headers = { // will be properly defined soon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get performance trend [=>Not getting desired result yet.] | |
public function get_performance_trend(){ | |
global $DB; | |
//Query for all enrolled course first | |
$sql = "select c.id as id, c.shortname,c.category from {course} c | |
inner join {enrol} e on e.courseid = c.id | |
inner join {user_enrolments} u on e.id=u.enrolid | |
where u.userid=15"; //total is 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D3js |