Commit c1d6e95b authored by Frederic Massart's avatar Frederic Massart Committed by Dan Poltawski
Browse files

MDL-55584 theme_noname: Patching for better feel in grades

Part of MDL-55071
parent d68a9ece
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Overriden gradereport_history renderer.
*
* @package theme_noname
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_noname\output;
defined('MOODLE_INTERNAL') || die();
use gradereport_history\output\user_button;
/**
* Overriden gradereport_history renderer.
*
* @package theme_noname
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class gradereport_history_renderer extends \gradereport_history\output\renderer {
public function render_user_button(user_button $button) {
$data = $button->export_for_template($this);
return $this->render_from_template('gradereport_history/user_button', $data);
}
}
......@@ -378,16 +378,6 @@ a.skip:active {
.groupselector label {
display: inline-block;
}
// Data format selector
.dataformatselector {
margin: 1em 0;
}
.dataformatselector label {
display: inline-block;
margin: 0 5px 10px 0;
line-height: 30px;
vertical-align: top;
}
// Login
.login-page {
......
......@@ -310,7 +310,7 @@
tr:nth-of-type(even) .cell,
.floater .cell,
.avg {
background-color: $table-bg-accent;
background-color: $gray-lightest;
}
table .clickable {
cursor: pointer;
......@@ -333,3 +333,9 @@
}
}
/**
* Single view.
*/
.path-grade-report-singleview input[name^="finalgrade"] {
width: 80px;
}
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/dataformat_selector
Context variables required for this template:
* label
* base
* name
* params
* options
* sesskey
* submit
}}
<form method="get" action="{{base}}" class="dataformatselector m-a-1">
<div class="form-inline text-xs-right">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<label for="downloadtype_{{name}}" class="m-r-1">{{label}}</label>
<select name="{{name}}" id="downloadtype_{{name}}" class="form-control">
{{#options}}
<option value="{{value}}">{{label}}</option>
{{/options}}
</select>
<buttom type="submit" class="btn btn-secondary">{{submit}}</button>
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/params}}
</div>
</form>
<div class="{{classes}}">
<div class="{{classes}} d-inline-block">
<form method="{{method}}" action="{{action}}" class="form-inline">
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
......
......@@ -2,7 +2,7 @@
<label class="col-md-3 col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
{{{label}}} {{{helpbutton}}}
</label>
<div class="col-md-9 form-inline">
<div class="col-md-9 form-inline felement">
{{$ element }}
<!-- Element goes here -->
{{/ element }}
......
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Edit tree.
}}
<form id="gradetreeform" method="post" action="{{actionurl}}">
<div>
<input type="hidden" name="sesskey" value="{{sesskey}}">
{{#notification}}
{{>core/notification_info}}
{{/notification}}
{{{table}}}
<div id="gradetreesubmit">
{{#showsave}}
<input class="advanced btn btn-primary" type="submit" value={{#quote}}{{#str}}savechanges{{/str}}{{/quote}}>
{{/showsave}}
{{#showbulkmove}}
<div class="form-inline m-t-1">
<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput">
<label for="menumoveafter">{{#str}}moveselectedto, grades{{/str}}</label>
<select name="moveafter" id="menumoveafter" class="ignoredirty singleselect select form-control">
{{#bulkmoveoptions}}
<option value="{{value}}">{{name}}</option>
{{/bulkmoveoptions}}
</select>
</div>
{{/showbulkmove}}
</div>
</div>
</form>
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Weight field.
}}
<label class="accesshide" for="weight_{{id}}">
{{#str}}extracreditvalue, grades, {{itemname}}{{/str}}
</label>
<input type="text" name="weight_{{id}}" id="weight_{{id}}" value="{{value}}" size="4" class="form-control">
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Weight field.
}}
<div class="form-inline">
<label class="accesshide" for="weightoverride_{{id}}">
{{#str}}overrideweightofa, grades, {{itemname}}{{/str}}
</label>
<input type="hidden" name="weightoverride_{{id}}" value="0">
<input type="checkbox" name="weightoverride_{{id}}" id="weightoverride_{{id}}" value="1" class="weightoverride" {{#checked}}checked{{/checked}}>
<label class="accesshide" for="weight_{{id}}">
{{#str}}weightofa, grades, {{itemname}}{{/str}}
</label>
<input type="text" name="weight_{{id}}" id="weight_{{id}}" value="{{value}}" size="4" {{#disabled}}disabled{{/disabled}} class="form-control">
</div>
<div class="{{classes}}">
<div method="{{method}}" action="{{url}}" id="{{formid}}">
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/params}}
<input type="button" class="btn btn-secondary selectortrigger"
id="{{id}}"
title={{#quote}}{{tooltip}}{{/quote}}
value={{#quote}}{{label}}{{/quote}}
{{#disabled}}disabled{{/disabled}}>
</div>
</div>
{{#hasactions}}
{{#js}}
require(['core/yui'], function(Y) {
{{#actions}}
Y.on('{{event}}', {{{jsfunction}}}, '#{{id}}', null{{#jsfunctionargs}}, {{{jsfunctionargs}}}{{/jsfunctionargs}});
{{/actions}}
});
{{/js}}
{{/hasactions}}
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Bulk insert attribute.
}}
<div class="enable">
<input type="checkbox" name="{{applyname}}" value="1" id="{{applyname}}">
<label for="{{applyname}}">{{applylabel}}</label>
</div>
<fieldset class="form-inline">
<legend class="accesshide">{{label}}</legend>
<label for="{{menuname}}">{{menulabel}}</label>
<select name="{{menuname}}" id="{{menuname}}" class="form-control">
{{#menuoptions}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/menuoptions}}
</select>
<label for="{{valuename}}">{{valuelabel}}</label>
{{{valuefield}}}
</fieldset>
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Button.
}}
<input type="{{type}}" value={{#quote}}{{value}}{{/quote}} class="btn btn-secondary">
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Dropdown attribute.
}}
<select id="{{name}}" name="{{name}}" class="custom-select" tabindex="1" {{#disabled}}disabled{{/disabled}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
<input type="hidden" name="old{{name}}" value="{{value}}">
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
Text attribute.
}}
<label for="{{name}}" class="accesshide">{{label}}</label>
<input id="{{name}}" name="{{name}}" type="text" value="{{value}}" class="form-control" {{#tabindex}}tabindex="{{.}}"{{/tabindex}} {{#disabled}}disabled{{/disabled}}>
<input type="hidden" name="old{{name}}" value="{{value}}">
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment