Skip to content

Commit

Permalink
MDL-47361 tooL_monitor: string and UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Nov 3, 2014
1 parent eb0aabd commit 7293e97
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 465 deletions.
93 changes: 0 additions & 93 deletions admin/tool/monitor/classes/output/helpicon/renderable.php

This file was deleted.

79 changes: 0 additions & 79 deletions admin/tool/monitor/classes/output/helpicon/renderer.php

This file was deleted.

44 changes: 22 additions & 22 deletions admin/tool/monitor/classes/output/managerules/renderable.php
Expand Up @@ -66,13 +66,13 @@ public function __construct($uniqueid, \moodle_url $url, $courseid = 0, $perpage

$this->set_attribute('id', 'toolmonitorrules_table');
$this->set_attribute('class', 'toolmonitor managerules generaltable generalbox');
$this->define_columns(array('name', 'description', 'context', 'plugin', 'eventname', 'filters', 'manage'));
$this->define_columns(array('name', 'description', 'course', 'plugin', 'eventname', 'filters', 'manage'));
$this->define_headers(array(
get_string('name'),
get_string('rulename', 'tool_monitor'),
get_string('description'),
get_string('context', 'tool_monitor'),
get_string('plugin'),
get_string('eventname'),
get_string('course'),
get_string('area', 'tool_monitor'),
get_string('event', 'tool_monitor'),
get_string('frequency', 'tool_monitor'),
get_string('manage', 'tool_monitor'),
)
Expand All @@ -93,7 +93,6 @@ public function __construct($uniqueid, \moodle_url $url, $courseid = 0, $perpage
* Generate content for name column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the column field.
*/
public function col_name(\tool_monitor\rule $rule) {
Expand All @@ -104,18 +103,33 @@ public function col_name(\tool_monitor\rule $rule) {
* Generate content for description column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the column field.
*/
public function col_description(\tool_monitor\rule $rule) {
return $rule->get_description($this->context);
}

/**
* Generate content for plugin column.
* Generate content for course column.
*
* @param \tool_monitor\rule $rule rule object
* @return string html used to display the context column field.
*/
public function col_course(\tool_monitor\rule $rule) {
$coursename = $rule->get_course_name($this->context);

$courseid = $rule->courseid;
if (empty($courseid)) {
return $coursename;
} else {
return \html_writer::link(new \moodle_url('/course/view.php', array('id' => $this->courseid)), $coursename);
}
}

/**
* Generate content for plugin column.
*
* @param \tool_monitor\rule $rule rule object
* @return string html used to display the column field.
*/
public function col_plugin(\tool_monitor\rule $rule) {
Expand All @@ -126,7 +140,6 @@ public function col_plugin(\tool_monitor\rule $rule) {
* Generate content for eventname column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the column field.
*/
public function col_eventname(\tool_monitor\rule $rule) {
Expand All @@ -137,7 +150,6 @@ public function col_eventname(\tool_monitor\rule $rule) {
* Generate content for filters column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the filters column field.
*/
public function col_filters(\tool_monitor\rule $rule) {
Expand All @@ -148,7 +160,6 @@ public function col_filters(\tool_monitor\rule $rule) {
* Generate content for manage column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the manage column field.
*/
public function col_manage(\tool_monitor\rule $rule) {
Expand Down Expand Up @@ -197,15 +208,4 @@ public function query_db($pagesize, $useinitialsbar = true) {
$this->initialbars($total > $pagesize);
}
}

/**
* Generate content for context column.
*
* @param \tool_monitor\rule $rule rule object
*
* @return string html used to display the context column field.
*/
public function col_context(\tool_monitor\rule $rule) {
return ($rule->courseid == 0) ? get_string('system', 'tool_monitor') : get_string('course');
}
}

0 comments on commit 7293e97

Please sign in to comment.