Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_content() {
- global $CFG, $DB;
- $courseid = required_param('id', PARAM_INT);
- $grade_setting=$DB->get_records('grade_settings', array('courseid' => $courseid));
- $results = array();
- $new_array = array();
- $this->content = new stdClass;
- $this->content->footer = '';
- foreach ($grade_setting as $rows) {
- $results[]=
- [
- 'id' => $rows->id,
- 'courseid' => $rows->courseid,
- $rows->name => $rows->value
- ];
- foreach ($results as $key => $value) {
- $new_array= array_merge($new_array,$value);
- }
- }
- foreach ($new_array as $key => $value) {
- echo $key. ":".$value;
- /* var_dump($abc);*/
- };
- //$this->content->text
- return $this->content;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement