Skip to content

Commit

Permalink
CTP-3690 correct commit 16f5fa2 wrapped_object
Browse files Browse the repository at this point in the history
  • Loading branch information
watson8 committed Sep 9, 2024
1 parent f72a8df commit 25e2797
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions classes/decorators/submission_groups_decorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* submissions enabled. We want to make sure that the students get the grade of the group thing rather
* than their own missing assignment.
*
* @property submission wrapped_object
* @property submission wrappedobject
* @package mod_coursework\decorators
*/
class submission_groups_decorator extends decorator {
Expand All @@ -43,11 +43,11 @@ class submission_groups_decorator extends decorator {
*/
public function user_is_in_same_group($user) {

if (!$this->wrapped_object->get_coursework()->is_configured_to_have_group_submissions()) {
if (!$this->wrappedobject->get_coursework()->is_configured_to_have_group_submissions()) {
throw new \coding_exception('Asking for groups membership of a submissions when we are not using groups');
}

$group = $this->wrapped_object->get_allocatable();
$group = $this->wrappedobject->get_allocatable();

return groups_is_member($group->id, $user->id);
}
Expand Down
12 changes: 6 additions & 6 deletions classes/framework/decorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class decorator {
protected $wrappedobject;

/**
* @param $wrapped_object
* @param $wrappedobject
*/
public function __construct($wrappedobject) {
$this->wrapped_object = $wrappedobject;
$this->wrappedobject = $wrappedobject;
}

/**
Expand All @@ -50,7 +50,7 @@ public function __construct($wrappedobject) {
* @return mixed
*/
public function __call($method, $args) {
return call_user_func_array([$this->wrapped_object,
return call_user_func_array([$this->wrappedobject,
$method],
$args);
}
Expand All @@ -62,7 +62,7 @@ public function __call($method, $args) {
* @return mixed
*/
public function __get($name) {
return $this->wrapped_object->$name;
return $this->wrappedobject->$name;
}

/**
Expand All @@ -73,13 +73,13 @@ public function __get($name) {
* @return mixed
*/
public function __set($name, $value) {
return $this->wrapped_object->$name = $value;
return $this->wrappedobject->$name = $value;
}

/**
* @return mixed
*/
public function wrapped_object() {
return $this->wrapped_object;
return $this->wrappedobject;
}
}

0 comments on commit 25e2797

Please sign in to comment.