Skip to content

Commit

Permalink
WIP: trying to add mform data in import
Browse files Browse the repository at this point in the history
  • Loading branch information
TamaroWalter committed Mar 12, 2024
1 parent acc1fcc commit b39a422
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// Include config and locallib.
require_once('../../config.php');
require_once($CFG->dirroot . '/mod/moodleoverflow/locallib.php');
require_once($CFG->dirroot . '/course/modlib.php');

// Declare optional parameters.
$d = required_param('d', PARAM_INT); // The ID of the discussion.
Expand Down Expand Up @@ -160,8 +161,9 @@

echo '<div id="moodleoverflow-posts"><div id="moodleoverflow-root">';

moodleoverflow_print_discussion($course, $cm, $moodleoverflow, $discussion, $post, $multiplemarks);

//moodleoverflow_print_discussion($course, $cm, $moodleoverflow, $discussion, $post, $multiplemarks);
$processingdata = get_moduleinfo_data($cm, $course);
var_dump($processingdata);
echo '</div></div>';

echo $OUTPUT->footer();
1 change: 0 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ function moodleoverflow_add_instance(stdClass $moodleoverflow, mod_moodleoverflo
$moodleoverflow->timecreated = time();

// You may have to add extra stuff in here.

$moodleoverflow->id = $DB->insert_record('moodleoverflow', $moodleoverflow);

return $moodleoverflow->id;
Expand Down
8 changes: 8 additions & 0 deletions mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,15 @@ public function data_postprocessing($data) {
}
}

/**
* Set
* @param $default_values
* @return void
*/
public function data_preprocessing(&$default_values) {
parent::data_preprocessing($default_values);

// Fill the anonymous and the grade options with the values that were set.

}
}

0 comments on commit b39a422

Please sign in to comment.