Skip to content

Commit 0c66db7

Browse files
committed
codecleaning
1 parent 4be841f commit 0c66db7

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

Diff for: classes/output/helpicon.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct($htmlclass, $content) {
4646
$iconstyle = ['style' =>
4747
'max-width: 20px; max-height: 20px; margin: 0; padding: 0; box-sizing: content-box; margin-right: .5rem;'];
4848
$icon = \html_writer::img($iconurl, $content, $iconstyle);
49-
// 'style' => 'display: inline-block; max-width: 100%; max-height: 100%;',
49+
5050
$class = $htmlclass;
5151
$iconattributes = ['role' => 'button',
5252
'style' => 'display: inline;',

Diff for: classes/tables/userstats_table.php

-22
Original file line numberDiff line numberDiff line change
@@ -152,33 +152,11 @@ public function get_usertable() {
152152
* Setup the help icon for amount of activity
153153
*/
154154
public function set_helpactivity() {
155-
global $CFG;
156155
$htmlclass = 'helpactivityclass btn btn-link';
157156
$content = get_string('helpamountofactivity', 'moodleoverflow');
158157
$helpobject = new helpicon($htmlclass, $content);
159158
$this->helpactivity = new \stdClass();
160159
$this->helpactivity->object = $helpobject->get_helpicon();
161-
/*
162-
$this->helpactivity = new \stdClass();
163-
$this->helpactivity->iconurl = $CFG->wwwroot . '/pix/a/help.svg';
164-
$this->helpactivity->icon = \html_writer::img($this->helpactivity->iconurl,
165-
get_string('helpamountofactivity', 'moodleoverflow'));
166-
$this->helpactivity->class = 'helpactivityclass btn btn-link';
167-
$this->helpactivity->iconattributes = ['role' => 'button',
168-
'data-container' => 'body',
169-
'data-toggle' => 'popover',
170-
'data-placement' => 'right',
171-
'data-action' => 'showhelpicon',
172-
'data-html' => 'true',
173-
'data-trigger' => 'focus',
174-
'tabindex' => '0',
175-
'data-content' => '<div class=&quot;no-overflow&quot;><p>' .
176-
get_string('helpamountofactivity', 'moodleoverflow') .
177-
'</p> </div>', ];
178-
179-
$this->helpactivity->object = \html_writer::span($this->helpactivity->icon,
180-
$this->helpactivity->class,
181-
$this->helpactivity->iconattributes);*/
182160
}
183161

184162
// Functions that show the data.

Diff for: locallib.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ function moodleoverflow_print_post($post, $discussion, $moodleoverflow, $cm, $co
15271527
* @param stdClass $limitedanswersetting Two Unix timestamp wrapped in a stdClass, upper and lower label for answering.
15281528
* @return bool
15291529
*/
1530-
function is_currently_time_limited($limitedanswersetting) : bool {
1530+
function is_currently_time_limited($limitedanswersetting): bool {
15311531
return ($limitedanswersetting->la_starttime != 0 && $limitedanswersetting->la_starttime > time())
15321532
|| ($limitedanswersetting->la_endtime != 0 && $limitedanswersetting->la_endtime < time());
15331533
}

0 commit comments

Comments
 (0)