';
@@ -540,23 +540,23 @@
if ($data && $sessiondata) {
// Add form.
- $mform = new mod_pingo_questionfromcatalogue_form(new moodle_url('/mod/pingo/view.php', array('id' => $cm->id)),
- array('questions' => $data->questions, 'duration_choices' => $durationchoices,
+ $mform = new mod_pingo_questionfromcatalogue_form(new moodle_url('/mod/pingo/view.php', ['id' => $cm->id]),
+ ['questions' => $data->questions, 'duration_choices' => $durationchoices,
'sessiontoken' => format_text($sessiondata['token'], 2)
, 'sessionname' => format_text($sessiondata['name'], 2),
- 'remoteurl' => $remoteurl, 'tags' => $data->tags));
+ 'remoteurl' => $remoteurl, 'tags' => $data->tags, ]);
if ($tag == 0) {
$tag = 'alltags';
}
// Set default data.
- $mform->set_data(array('id' => $cm->id, 'session' => $sessiondata['token'], 'tag' => $tag));
+ $mform->set_data(['id' => $cm->id, 'session' => $sessiondata['token'], 'tag' => $tag]);
// Render form.
echo $mform->render();
} else {
- $urlparams = array('id' => $id, 'session' => $session, 'mode' => 3);
+ $urlparams = ['id' => $id, 'session' => $session, 'mode' => 3];
$redirecturl = new moodle_url('/mod/pingo/view.php', $urlparams);
echo '
';
@@ -577,9 +577,9 @@
if ($sessiondata && $durationchoices) {
// Add form.
- $mform = new mod_pingo_stopsurvey_form(new moodle_url('/mod/pingo/view.php', array('id' => $cm->id)),
- array('duration_choices' => $durationchoices, 'session' => $session,
- 'remoteurl' => $remoteurl));
+ $mform = new mod_pingo_stopsurvey_form(new moodle_url('/mod/pingo/view.php', ['id' => $cm->id]),
+ ['duration_choices' => $durationchoices, 'session' => $session,
+ 'remoteurl' => $remoteurl, ]);
if (isset($sessiondata['latest_survey']) && isset($sessiondata['latest_survey']['id'])) {
$surveyid = $sessiondata['latest_survey']['id'];
@@ -588,8 +588,8 @@
}
// Set default data.
- $mform->set_data(array('id' => $cm->id, 'session' => $session,
- 'surveyid' => $surveyid));
+ $mform->set_data(['id' => $cm->id, 'session' => $session,
+ 'surveyid' => $surveyid, ]);
// Render form.
$stopsurveyform = $mform->render();
@@ -619,7 +619,7 @@
echo $OUTPUT->render($sessionview);
} else {
- $urlparams = array('id' => $id, 'session' => $session, 'mode' => 4);
+ $urlparams = ['id' => $id, 'session' => $session, 'mode' => 4];
$redirecturl = new moodle_url('/mod/pingo/view.php', $urlparams);
echo '
';
@@ -633,10 +633,10 @@
} else { // Show form for login to PINGO.
// Add form for PINGO login.
- $mform = new mod_pingo_login_form(new moodle_url('/mod/pingo/view.php', array('id' => $cm->id)));
+ $mform = new mod_pingo_login_form(new moodle_url('/mod/pingo/view.php', ['id' => $cm->id]));
// Set default data.
- $mform->set_data(array('id' => $cm->id));
+ $mform->set_data(['id' => $cm->id]);
echo $mform->render();
}
@@ -678,10 +678,10 @@
if ($sessiondata) {
// Add section with sessions overview.
- $participantsview = new pingo_participantsview($cm->id, array($sessiondata), $surveyactive, $surveyendstr);
+ $participantsview = new pingo_participantsview($cm->id, [$sessiondata], $surveyactive, $surveyendstr);
echo $OUTPUT->render($participantsview);
} else {
- $urlparams = array('id' => $id, 'mode' => 1);
+ $urlparams = ['id' => $id, 'mode' => 1];
$redirecturl = new moodle_url('/mod/pingo/view.php', $urlparams);
echo '
';