Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
MDL-18229 gradebook: Renaming of Single_view to Single view
Browse files Browse the repository at this point in the history
  • Loading branch information
zbdd committed Oct 14, 2014
1 parent edd8b27 commit d124a60
Show file tree
Hide file tree
Showing 14 changed files with 144 additions and 142 deletions.
50 changes: 0 additions & 50 deletions grade/report/single_view/styles.css

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
/**
* The gradebook simple view - base class for the table
*
* @package simple_view
* @package singleview
* @copyright 2014 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once $CFG->dirroot . '/grade/report/single_view/classes/uilib.php';
require_once $CFG->dirroot . '/grade/report/singleview/classes/uilib.php';

interface selectable_items {
public function description();
Expand All @@ -37,7 +37,7 @@ interface item_filtering {
public static function filter($item);
}

abstract class single_view_screen {
abstract class singleview_screen {
var $courseid;

var $itemid;
Expand Down Expand Up @@ -72,7 +72,7 @@ public function setup_structure() {
}

public function format_link($screen, $itemid, $display = null) {
$url = new moodle_url('/grade/report/single_view/index.php', array(
$url = new moodle_url('/grade/report/singleview/index.php', array(
'id' => $this->courseid,
'item' => $screen,
'itemid' => $itemid,
Expand Down Expand Up @@ -123,12 +123,12 @@ public function make_toggle($key) {
}

public function make_toggle_links($key) {
return get_string($key, 'gradereport_single_view') . ' ' .
return get_string($key, 'gradereport_singleview') . ' ' .
$this->make_toggle($key);
}

public function heading() {
return get_string('pluginname', 'gradereport_single_view');
return get_string('pluginname', 'gradereport_singleview');
}

public abstract function init($self_item_is_empty = false);
Expand All @@ -146,11 +146,11 @@ public function pager() {

global $OUTPUT;

list($___, $item) = explode('single_view_', get_class($this));
list($___, $item) = explode('singleview_', get_class($this));

return $OUTPUT->paging_bar(
count($this->items), $this->page, $this->perpage,
new moodle_url('/grade/report/single_view/index.php', array(
new moodle_url('/grade/report/singleview/index.php', array(
'perpage' => $this->perpage,
'id' => $this->courseid,
'groupid' => $this->groupid,
Expand All @@ -164,17 +164,17 @@ public function js() {
global $PAGE;

$module = array(
'name' => 'gradereport_single_view',
'fullpath' => '/grade/report/single_view/js/single_view.js',
'name' => 'gradereport_singleview',
'fullpath' => '/grade/report/singleview/js/singleview.js',
'requires' => array('base', 'dom', 'event', 'event-simulate', 'io-base')
);

$PAGE->requires->js_init_call('M.gradereport_single_view.init', array(), false, $module);
$PAGE->requires->js_init_call('M.gradereport_singleview.init', array(), false, $module);
}

public function factory() {
if (empty($this->__factory)) {
$this->__factory = new single_view_grade_ui_factory();
$this->__factory = new singleview_grade_ui_factory();
}

return $this->__factory;
Expand Down Expand Up @@ -250,7 +250,7 @@ public function display_group_selector() {
}
}

abstract class single_view_tablelike extends single_view_screen implements tabbable {
abstract class singleview_tablelike extends singleview_screen implements tabbable {
var $items;

protected $headers = array();
Expand Down Expand Up @@ -380,7 +380,7 @@ public function html() {

qe_events_trigger($underlying . '_table_built', $data);

$button_attr = array('class' => 'single_view_buttons submit');
$button_attr = array('class' => 'singleview_buttons submit');
$button_html = implode(' ', $this->buttons());

$buttons = html_writer::tag('div', $button_html, $button_attr);
Expand All @@ -395,7 +395,7 @@ public function bulk_insert() {
return html_writer::tag(
'div',
$this->factory()->create('bulk_insert')->format($this->item)->html(),
array('class' => 'single_view_bulk')
array('class' => 'singleview_bulk')
);
}

Expand Down
Loading

0 comments on commit d124a60

Please sign in to comment.