Skip to content

Commit

Permalink
Merge pull request #19 from bdecentgmbh/dev
Browse files Browse the repository at this point in the history
Merge to main for 1.3 release
  • Loading branch information
stefanscholz authored Jun 13, 2023
2 parents 4c1ddf0 + b3e29c3 commit b63ed11
Show file tree
Hide file tree
Showing 30 changed files with 1,988 additions and 1,341 deletions.
150 changes: 100 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,100 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
# Node artifact files
node_modules/
dist/
# Compiled Java class files
*.class
# Compiled Python bytecode
*.py[cod]
# Log files
*.log
# Package files
*.jar
# Maven
target/
dist/
# JetBrains IDE
.idea/
# Unit test reports
TEST*.xml
# Generated by MacOS
.DS_Store
# Generated by Windows
Thumbs.db
# Applications
*.app
*.exe
*.war
# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv
# These are some examples of commonly ignored file patterns.

# You should customize this list as applicable to your project.

# Learn more about .gitignore:

# https://www.atlassian.com/git/tutorials/saving-changes/gitignore



# Node artifact files

node_modules/

dist/



# Compiled Java class files

*.class



# Compiled Python bytecode

*.py[cod]



# Log files

*.log



# Package files

*.jar



# Maven

target/

dist/



# JetBrains IDE

.idea/



# Unit test reports

TEST*.xml



# Generated by MacOS

.DS_Store



# Generated by Windows

Thumbs.db



# Applications

*.app

*.exe

*.war



# Large media files

*.mp4

*.tiff

*.avi

*.flv

*.mov

*.wmv



310 changes: 276 additions & 34 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/modal_preset.min.js.map

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

2 changes: 1 addition & 1 deletion amd/src/modal_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/m
}

return ModalPreset;
});
});
2 changes: 1 addition & 1 deletion approve.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
}
$approvalroles = $pulse->completionapprovalroles;
$hasrole = pulse_has_approvalrole($approvalroles, $cmid);
$hasrole = \mod_pulse\helper::pulse_has_approvalrole($approvalroles, $cmid);

require_login();

Expand Down
2 changes: 1 addition & 1 deletion backup/moodle2/backup_pulse_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function define_structure() {
$pulse->annotate_files('mod_pulse', 'intro', null);
$pulse->annotate_files('mod_pulse', 'pulse_content', null);

$pulse = pulse_extend_backup_steps($pulse, $userinfo);
$pulse = \mod_pulse\extendpro::pulse_extend_backup_steps($pulse, $userinfo);

// Return the root element (data), wrapped into standard activity structure.
return $this->prepare_activity_structure($pulse);
Expand Down
2 changes: 1 addition & 1 deletion backup/moodle2/restore_pulse_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function define_decode_contents() {

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

pulse_extend_restore_content($contents);
\mod_pulse\extendpro::pulse_extend_restore_content($contents);

return $contents;
}
Expand Down
2 changes: 1 addition & 1 deletion backup/moodle2/restore_pulse_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function define_structure() {
$paths[] = new restore_path_element('pulse_users', '/activity/pulse/notifiedusers/pulse_users');
$paths[] = new restore_path_element('pulse_completion', '/activity/pulse/usercompletion/pulse_completion');

$methods = pulse_extend_restore_structure($paths);
$methods = \mod_pulse\extendpro::pulse_extend_restore_structure($paths);
// Return the paths wrapped into standard activity structure.
return $this->prepare_activity_structure($paths);
}
Expand Down
6 changes: 3 additions & 3 deletions classes/completion/custom_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function get_custom_rule_descriptions(): array {
$selfstring = get_string('completion:self', 'pulse');
$approvalstring = get_string('completion:approval', 'pulse');

if (pulse_user_isstudent($this->cm->id)) {
if (\mod_pulse\helper::pulse_user_isstudent($this->cm->id)) {
if ( $this->is_available('completionwhenavailable') ) {
$state = $this->get_state('completionwhenavailable');
if (in_array($state, [COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS])) {
Expand All @@ -145,15 +145,15 @@ public function get_custom_rule_descriptions(): array {
if ($this->is_available('completionself') ) {
$state = $this->get_state('completionself');
if (in_array($state, [COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS])) {
$date = pulse_already_selfcomplete($this->cm->instance, $this->userid);
$date = \mod_pulse\helper::pulse_already_selfcomplete($this->cm->instance, $this->userid);
$selfstring = get_string('selfmarked', 'pulse', ['date' => $date]);
}
}
// Approval completion description.
if ($this->is_available('completionapproval') ) {
$state = $this->get_state('completionapproval');
if (in_array($state, [COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS])) {
$message = pulse_user_approved($this->cm->instance, $this->userid);
$message = \mod_pulse\helper::pulse_user_approved($this->cm->instance, $this->userid);
$approvalstring = html_to_text($message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/eventobserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function user_enrolment_deleted($event) {
$userid = $event->relateduserid; // Unenrolled user id.
$courseid = $event->courseid;
// Retrive list of pulse instance added in course.
$list = pulse_course_instancelist($courseid);
$list = \mod_pulse\helper::course_instancelist($courseid);
if (!empty($list)) {
$pulselist = array_column($list, 'instance');
list($insql, $inparams) = $DB->get_in_or_equal($pulselist);
Expand Down
Loading

0 comments on commit b63ed11

Please sign in to comment.