mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'wip-mdl-40919' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
03b8d9e3c3
12 changed files with 552 additions and 8 deletions
|
@ -96,8 +96,14 @@ $completion->set_module_viewed($cm);
|
|||
// Check the survey hasn't already been filled out.
|
||||
|
||||
if (survey_already_done($survey->id, $USER->id)) {
|
||||
|
||||
add_to_log($course->id, "survey", "view graph", "view.php?id=$cm->id", $survey->id, $cm->id);
|
||||
$params = array(
|
||||
'objectid' => $survey->id,
|
||||
'context' => $context,
|
||||
'courseid' => $course->id,
|
||||
'other' => array('viewed' => 'graph')
|
||||
);
|
||||
$event = \mod_survey\event\course_module_viewed::create($params);
|
||||
$event->trigger();
|
||||
$numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
|
||||
|
||||
if ($showscales) {
|
||||
|
@ -134,7 +140,14 @@ $completion->set_module_viewed($cm);
|
|||
}
|
||||
|
||||
// Start the survey form
|
||||
add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
|
||||
$params = array(
|
||||
'objectid' => $survey->id,
|
||||
'context' => $context,
|
||||
'courseid' => $course->id,
|
||||
'other' => array('viewed' => 'form')
|
||||
);
|
||||
$event = \mod_survey\event\course_module_viewed::create($params);
|
||||
$event->trigger();
|
||||
|
||||
echo "<form method=\"post\" action=\"save.php\" id=\"surveyform\">";
|
||||
echo '<div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue