SHARE
TWEET

Untitled

a guest Sep 18th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    function get_content() {
  2.         global $CFG, $DB;
  3.         $courseid        = required_param('id', PARAM_INT);
  4.         $grade_setting=$DB->get_records('grade_settings', array('courseid' => $courseid));
  5.         $results = array();
  6.         $new_array = array();
  7.         $this->content = new stdClass;
  8.         $this->content->footer = '';
  9.          foreach ($grade_setting as $rows) {
  10.                 $results[]=
  11.                 [
  12.                   'id' => $rows->id,
  13.                  'courseid' => $rows->courseid,
  14.                   $rows->name => $rows->value
  15.                 ];
  16.                 foreach ($results as $key => $value) {
  17.                 $new_array= array_merge($new_array,$value);
  18.                }
  19.             }
  20.            foreach ($new_array as $key => $value) {
  21.             echo $key. ":".$value;
  22.       /*     var_dump($abc);*/
  23.            };
  24.  
  25.               //$this->content->text  
  26.  
  27.  
  28.         return $this->content;
  29.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top