mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-55584 theme_noname: Patching for better feel in grades
Part of MDL-55071
This commit is contained in:
parent
d68a9ece86
commit
c1d6e95b52
44
theme/noname/classes/output/gradereport_history_renderer.php
Normal file
44
theme/noname/classes/output/gradereport_history_renderer.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?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 {
|
.groupselector label {
|
||||||
display: inline-block;
|
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
|
||||||
.login-page {
|
.login-page {
|
||||||
|
@ -310,7 +310,7 @@
|
|||||||
tr:nth-of-type(even) .cell,
|
tr:nth-of-type(even) .cell,
|
||||||
.floater .cell,
|
.floater .cell,
|
||||||
.avg {
|
.avg {
|
||||||
background-color: $table-bg-accent;
|
background-color: $gray-lightest;
|
||||||
}
|
}
|
||||||
table .clickable {
|
table .clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -333,3 +333,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Single view.
|
||||||
|
*/
|
||||||
|
.path-grade-report-singleview input[name^="finalgrade"] {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
43
theme/noname/templates/core/dataformat_selector.mustache
Normal file
43
theme/noname/templates/core/dataformat_selector.mustache
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{{!
|
||||||
|
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>
|
@ -1,4 +1,4 @@
|
|||||||
<div class="{{classes}}">
|
<div class="{{classes}} d-inline-block">
|
||||||
<form method="{{method}}" action="{{action}}" class="form-inline">
|
<form method="{{method}}" action="{{action}}" class="form-inline">
|
||||||
{{#params}}
|
{{#params}}
|
||||||
<input type="hidden" name="{{name}}" value="{{value}}">
|
<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 class="col-md-3 col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
|
||||||
{{{label}}} {{{helpbutton}}}
|
{{{label}}} {{{helpbutton}}}
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-9 form-inline">
|
<div class="col-md-9 form-inline felement">
|
||||||
{{$ element }}
|
{{$ element }}
|
||||||
<!-- Element goes here -->
|
<!-- Element goes here -->
|
||||||
{{/ element }}
|
{{/ element }}
|
||||||
|
45
theme/noname/templates/core_grades/edit_tree.mustache
Normal file
45
theme/noname/templates/core_grades/edit_tree.mustache
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{{!
|
||||||
|
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>
|
23
theme/noname/templates/core_grades/weight_field.mustache
Normal file
23
theme/noname/templates/core_grades/weight_field.mustache
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{{!
|
||||||
|
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">
|
@ -0,0 +1,31 @@
|
|||||||
|
{{!
|
||||||
|
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>
|
@ -0,0 +1,21 @@
|
|||||||
|
<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}}
|
@ -0,0 +1,34 @@
|
|||||||
|
{{!
|
||||||
|
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>
|
@ -0,0 +1,20 @@
|
|||||||
|
{{!
|
||||||
|
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">
|
@ -0,0 +1,25 @@
|
|||||||
|
{{!
|
||||||
|
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}}">
|
@ -0,0 +1,22 @@
|
|||||||
|
{{!
|
||||||
|
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}}">
|
Loading…
x
Reference in New Issue
Block a user