Skip to content

Commit

Permalink
Fixed php unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Sep 25, 2023
1 parent 83453fd commit 2cd5bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 2 additions & 7 deletions actions/notification/classes/notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,8 @@ class notification {
/**
* Create the instance of the notification controller.
*
<<<<<<< .mine
* @param [type] $notificationid Notification instance record id NOT autoinstanceid or notificationid.
* @return self
=======
* @param int $notificationid Notification instance record id NOT autoinstanceid.
* @param int $notificationid Notification instance record id (pulseaction_notification_ins) NOT autoinstanceid.
* @return notification
>>>>>>> .theirs
*/
public static function instance($notificationid) {
static $instance;
Expand Down Expand Up @@ -227,7 +222,7 @@ protected function create_instance_data() {
global $DB;

$notification = $DB->get_record('pulseaction_notification_ins', ['id' => $this->notificationid]);

if (empty($notification)) {
throw new \moodle_exception('notificationinstancenotfound', 'pulse');
}
Expand Down
3 changes: 2 additions & 1 deletion classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public static function update_emailvars($templatetext, $subject, $course, $user,
$sender = $sender ? $sender : core_user::get_support_user(); // Support user.
$amethods = pulse_email_vars::vars(); // List of available placeholders.
// Get formatted name of the category.
$course->category = core_course_category::get($course->category)->get_formatted_name();
$course->category = is_number($course->category)
? core_course_category::get($course->category)->get_formatted_name() : $course->category;
// Convert the placeholders timeformat to user readable.
self::convert_varstime_format($course);
self::convert_varstime_format($user);
Expand Down

0 comments on commit 2cd5bdf

Please sign in to comment.