Skip to content

Commit

Permalink
MDL-15471 tag: minor coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Sep 26, 2012
1 parent 680afde commit d0dff18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 5 additions & 5 deletions blocks/tags/block_tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public function get_content() {
$moretags = new moodle_url('/tag/coursetags_more.php', array('show'=>$tagtype));
if ($tagtype == 'all') {
$tags = coursetag_get_tags(0, 0, $this->config->tagtype, $this->config->numberoftags, 'name');
} else if ($tagtype=='course') {
} else if ($tagtype == 'course') {
$tags = coursetag_get_tags($this->page->course->id, 0, $this->config->tagtype, $this->config->numberoftags, 'name');
$moretags->param('courseid', $this->page->course->id);
} else if ($tagtype=='my') {
} else if ($tagtype == 'my') {
$tags = coursetag_get_tags(0, $USER->id, $this->config->tagtype, $this->config->numberoftags, 'name');
}
$tagcloud = tag_print_cloud($tags, 150, true);
Expand Down Expand Up @@ -142,7 +142,7 @@ public function get_content() {
has_capability('moodle/tag:create', context_course::instance($this->page->course->id))) {
$buttonadd = get_string('add', 'block_tags');
$arrowtitle = get_string('arrowtitle', 'block_tags');
$edit_tags = get_string('edittags', 'block_tags');
$edittags = get_string('edittags', 'block_tags');
$sesskey = sesskey();
$arrowright = $OUTPUT->pix_url('t/arrow_left');
$redirect = $this->page->url->out();
Expand Down Expand Up @@ -173,7 +173,7 @@ class="coursetag_form_input2a" onfocus="ctags_getKeywords()" onkeyup="ctags_getK
</div>
<div style="display: inline;">
<button type="submit">$buttonadd</button>
<a href="$CFG->wwwroot/tag/coursetags_edit.php?courseid=$COURSE->id" title="$edit_tags">$edit_tags</a>
<a href="$CFG->wwwroot/tag/coursetags_edit.php?courseid=$COURSE->id" title="$edittags">$edittags</a>
</div>
</div>
</form>
Expand All @@ -190,4 +190,4 @@ class="coursetag_form_input2a" onfocus="ctags_getKeywords()" onkeyup="ctags_getK

return $this->content;
}
}
}
2 changes: 0 additions & 2 deletions tag/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
* @param bool $return if true the function will return the generated tag cloud instead of displaying it.
* @return string|null a HTML string or null if this function does the output
*/
//TODO question for integrator - for contrib work would it be best to add $tagset at the end of the parameter list
// not the beginning? I put it at the beginning because it sits better as alternative to $nr_of_tags there
function tag_print_cloud($tagset=null, $nr_of_tags=150, $return=false) {
global $CFG, $DB;

Expand Down

0 comments on commit d0dff18

Please sign in to comment.