Skip to content

Commit 929e718

Browse files
author
Eva Maria Karall
committed
Merge branch '8365/codeRefactoring' into 'main'
#8365 Small code refactoring to make code cleaner See merge request amc/moodle/moodle-mod_publication!144
2 parents 0dd5885 + 70a691f commit 929e718

File tree

13 files changed

+15
-139
lines changed

13 files changed

+15
-139
lines changed

amd/build/alignrows.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/modform.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/alignrows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of mod_grouptool for Moodle - http://moodle.org/
1+
// This file is part of mod_publication for Moodle - http://moodle.org/
22
//
33
// It is free software: you can redistribute it and/or modify
44
// it under the terms of the GNU General Public License as published by

amd/src/modform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of mod_grouptool for Moodle - http://moodle.org/
1+
// This file is part of mod_publication for Moodle - http://moodle.org/
22
//
33
// It is free software: you can redistribute it and/or modify
44
// it under the terms of the GNU General Public License as published by

classes/local/allfilestable/base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class base extends \table_sql {
9898
* @param string $filter filter for this table
9999
*/
100100
public function __construct($uniqueid, \publication $publication, $filter) {
101-
global $CFG, $OUTPUT;
101+
global $CFG;
102102

103103
$this->allfilespage = $publication->get_allfilespage();
104104
parent::__construct($uniqueid);

classes/local/filestable/base.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ public function get_approval_status_for_file($file) {
160160

161161
$studentapproved = false;
162162
$studentdenied = false;
163-
$studentpending = false;
164163
$hint = '';
165164
if ($obtainstudentapproval == 1) {
166165
if ($studentapproval == 1) {
@@ -179,7 +178,6 @@ public function get_approval_status_for_file($file) {
179178
['class' => 'd-inline-block']
180179
);
181180
}
182-
$studentpending = true;
183181
$hint = get_string('student_pending', 'publication');
184182
}
185183
} else {
@@ -191,7 +189,6 @@ public function get_approval_status_for_file($file) {
191189

192190
$teacherapproved = false;
193191
$teacherdenied = false;
194-
$teacherpending = false;
195192

196193
if ($obtainteacherapproval == 1) {
197194
if ($teacherapproval == 1) {
@@ -201,7 +198,6 @@ public function get_approval_status_for_file($file) {
201198
$teacherdenied = true;
202199
$hint .= get_string('teacher_rejected', 'publication');
203200
} else {
204-
$teacherpending = true;
205201
$hint .= get_string('teacher_pending', 'publication');
206202
}
207203
} else {

classes/local/filestable/group.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function get_approval_status_for_file($file) {
6060

6161
$studentapproved = false;
6262
$studentdenied = false;
63-
$studentpending = false;
6463
$hint = '';
6564

6665
if ($obtainstudentapproval == 1) {
@@ -129,7 +128,6 @@ public function get_approval_status_for_file($file) {
129128

130129
$teacherapproved = false;
131130
$teacherdenied = false;
132-
$teacherpending = false;
133131

134132
if ($obtainteacherapproval == 1) {
135133
if ($teacherapproval == 1) {

0 commit comments

Comments
 (0)