Skip to content

Commit

Permalink
Merge branch 'release/1.0.3'
Browse files Browse the repository at this point in the history
* release/1.0.3:
  fix(icon): Ensured compatibility with Moodle 4.3. Changed size of svgs to 24*24.
  • Loading branch information
Daniel Nolte committed Oct 23, 2023
2 parents c11d99a + a7bb4aa commit 5cfc0fa
Show file tree
Hide file tree
Showing 26 changed files with 256 additions and 284 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.3', '7.4', '8.0', '8.1']
moodle-branch: ['MOODLE_39_STABLE', 'MOODLE_310_STABLE', 'MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'MOODLE_401_STABLE', 'MOODLE_402_STABLE']
php: ['7.3', '7.4', '8.0', '8.1', '8.2']
moodle-branch: ['MOODLE_39_STABLE', 'MOODLE_310_STABLE', 'MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE']
database: [pgsql, mariadb]

steps:
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog ##

- [1.0.3]:
- Ensured compatibility with Moodle 4.3.
- Changed code to comply with new moodle coding standards.
- Changed size of svgs to 24*24.

- [1.0.2]:
- Added monologo icon.
- Changed purpose to communication.
Expand Down
2 changes: 1 addition & 1 deletion amd/build/view.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions backup/moodle2/backup_pingo_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ protected function define_structure() {
$userinfo = $this->get_setting_value('userinfo');

// Replace with the attributes and final elements that the element will handle.
$pingo = new backup_nested_element('pingo', array('id'), array(
'name', 'intro', 'introformat', 'timecreated', 'timemodified', 'editableforall'));
$pingo = new backup_nested_element('pingo', ['id'], [
'name', 'intro', 'introformat', 'timecreated', 'timemodified', 'editableforall', ]);

$connections = new backup_nested_element('connections');
$connection = new backup_nested_element('connection', array('id'), array(
'userid', 'authenticationtoken', 'timestarted', 'activesession'));
$connection = new backup_nested_element('connection', ['id'], [
'userid', 'authenticationtoken', 'timestarted', 'activesession', ]);

// Build the tree with these elements with $pingo as the root of the backup tree.
$pingo->add_child($connections);
$connections->add_child($connection);

// Define the source tables for the elements.

$pingo->set_source_table('pingo', array('id' => backup::VAR_ACTIVITYID));
$pingo->set_source_table('pingo', ['id' => backup::VAR_ACTIVITYID]);

if ($userinfo) {
// Connections.
$connection->set_source_table('pingo_connections', array('pingo' => backup::VAR_PARENTID));
$connection->set_source_table('pingo_connections', ['pingo' => backup::VAR_PARENTID]);
}

// Define id annotations.
Expand Down
12 changes: 6 additions & 6 deletions backup/moodle2/restore_pingo_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ protected function define_my_steps() {
* @return array.
*/
public static function define_decode_contents() {
$contents = array();
$contents = [];

// Define the contents (files).
// tablename, array(field1, field 2), $mapping.
// tablename, [field1, field 2], $mapping.

$contents[] = new restore_decode_content('pingo', array('intro'), 'pingo');
$contents[] = new restore_decode_content('pingo', ['intro'], 'pingo');

return $contents;
}
Expand All @@ -73,7 +73,7 @@ public static function define_decode_contents() {
* @return array.
*/
public static function define_decode_rules() {
$rules = array();
$rules = [];

// Define the rules.

Expand All @@ -91,7 +91,7 @@ public static function define_decode_rules() {
* @return array.
*/
public static function define_restore_log_rules() {
$rules = array();
$rules = [];

// Define the rules to restore the logs (one rule for each event / file in the plugin/event/ folder).

Expand All @@ -112,7 +112,7 @@ public static function define_restore_log_rules() {
* activity level. All them are rules not linked to any module instance (cmid = 0)
*/
public static function define_restore_log_rules_for_course() {
$rules = array();
$rules = [];

$rules[] = new restore_log_rule('pingo', 'view all', 'index.php?id={course}', null);

Expand Down
2 changes: 1 addition & 1 deletion backup/moodle2/restore_pingo_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class restore_pingo_activity_structure_step extends restore_activity_structure_s
* @return restore_path_element[].
*/
protected function define_structure() {
$paths = array();
$paths = [];
$userinfo = $this->get_setting_value('userinfo');

$paths[] = new restore_path_element('pingo', '/activity/pingo');
Expand Down
6 changes: 2 additions & 4 deletions classes/event/connection_closed.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@ public function get_description() {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/pingo/view.php', array(
'id' => $this->contextinstanceid
));
return new \moodle_url('/mod/pingo/view.php', ['id' => $this->contextinstanceid]);
}

/**
* Get objectid mapping for restore.
*/
public static function get_objectid_mapping() {
return array('db' => 'pingo_connections', 'restore' => 'pingo_connection');
return ['db' => 'pingo_connections', 'restore' => 'pingo_connection'];
}
}
6 changes: 2 additions & 4 deletions classes/event/connection_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@ public function get_description() {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/pingo/view.php', array(
'id' => $this->contextinstanceid
));
return new \moodle_url('/mod/pingo/view.php', ['id' => $this->contextinstanceid]);
}

/**
* Get objectid mapping for restore.
*/
public static function get_objectid_mapping() {
return array('db' => 'pingo_connections', 'restore' => 'pingo_connection');
return ['db' => 'pingo_connections', 'restore' => 'pingo_connection'];
}
}
2 changes: 1 addition & 1 deletion classes/event/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ protected function init() {
* Get objectid mapping for restore.
*/
public static function get_objectid_mapping() {
return array('db' => 'pingo', 'restore' => 'pingo');
return ['db' => 'pingo', 'restore' => 'pingo'];
}
}
4 changes: 1 addition & 3 deletions classes/event/pingo_login_failed.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function get_description() {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/pingo/view.php', array(
'id' => $this->contextinstanceid
));
return new \moodle_url('/mod/pingo/view.php', ['id' => $this->contextinstanceid]);
}
}
6 changes: 2 additions & 4 deletions classes/event/pingo_login_successful.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@ public function get_description() {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/pingo/view.php', array(
'id' => $this->contextinstanceid
));
return new \moodle_url('/mod/pingo/view.php', ['id' => $this->contextinstanceid]);
}

/**
* Get objectid mapping for restore.
*/
public static function get_objectid_mapping() {
return array('db' => 'pingo_connections', 'restore' => 'pingo_connection');
return ['db' => 'pingo_connections', 'restore' => 'pingo_connection'];
}
}
4 changes: 1 addition & 3 deletions classes/event/pingo_survey_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function get_description() {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/pingo/view.php', array(
'id' => $this->contextinstanceid
));
return new \moodle_url('/mod/pingo/view.php', ['id' => $this->contextinstanceid]);
}
}
Loading

0 comments on commit 5cfc0fa

Please sign in to comment.