Skip to content

Commit

Permalink
Merge branch 'MDL-56511-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 18, 2018
2 parents 45fc655 + 89f0061 commit 6979cf5
Show file tree
Hide file tree
Showing 238 changed files with 7,568 additions and 6,527 deletions.
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/manage_competencies_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</h2>
<div>{{{framework.description}}}</div>
<h3>{{#str}}competencies, core_competency{{/str}}</h3>
<div class="row-fluid">
<div class="row-fluid row">
<div class="span6 col-lg-6">
<p>
<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}" class="form-inline">
Expand All @@ -56,7 +56,7 @@
</div>

<div class="span6 card col-lg-6">
<div class="card-block">
<div class="card-block card-body">
<div class="card-title">
<h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
<span data-region="competencyactionsmenu" class="pull-xs-right">
Expand Down
12 changes: 6 additions & 6 deletions backup/util/ui/base_moodleform.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ public function definition() {
*/
public function definition_after_data() {
$buttonarray = array();
$buttonarray[] = $this->_form->createElement(
'submit',
'submitbutton',
get_string($this->uistage->get_ui()->get_name().'stage'.$this->uistage->get_stage().'action', 'backup'),
array('class' => 'proceedbutton')
);
if (!$this->uistage->is_first_stage()) {
$buttonarray[] = $this->_form->createElement('submit', 'previous', get_string('previousstage', 'backup'));
} else if ($this->uistage instanceof backup_ui_stage) {
Expand All @@ -141,6 +135,12 @@ public function definition_after_data() {
array('class' => 'oneclickbackup'));
}
$buttonarray[] = $this->_form->createElement('cancel', 'cancel', get_string('cancel'), array('class' => 'confirmcancel'));
$buttonarray[] = $this->_form->createElement(
'submit',
'submitbutton',
get_string($this->uistage->get_ui()->get_name().'stage'.$this->uistage->get_stage().'action', 'backup'),
array('class' => 'proceedbutton')
);
$this->_form->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$this->_form->closeHeaderBefore('buttonar');

Expand Down
4 changes: 2 additions & 2 deletions backup/util/ui/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ protected function backup_detail_pair($label, $value) {
$count ++;
$html = html_writer::start_tag('div', array('class' => 'detail-pair'));
$html .= html_writer::tag('label', $label, array('class' => 'detail-pair-label', 'for' => 'detail-pair-value-'.$count));
$html .= html_writer::tag('div', $value, array('class' => 'detail-pair-value', 'name' => 'detail-pair-value-'.$count));
$html .= html_writer::tag('div', $value, array('class' => 'detail-pair-value pl-2', 'name' => 'detail-pair-value-'.$count));
$html .= html_writer::end_tag('div');
return $html;
}
Expand Down Expand Up @@ -792,7 +792,7 @@ public function render_restore_category_search(restore_category_search $componen
$url = $component->get_url();

$output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline m-b-1'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results w-100'));

$table = new html_table();
$table->head = array('', get_string('name'), get_string('description'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</p>
</div>
</div>
<div class="hidden-md-down col-lg-5 col-xl-4 text-truncate">
<div class="hidden-md-down d-none d-md-block col-lg-5 col-xl-4 text-truncate">
{{#action.actionable}}
<a href="{{{action.url}}}">{{action.name}}</a>
{{#action.itemcount}}
Expand Down
10 changes: 3 additions & 7 deletions blocks/myoverview/templates/course-summary.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@
}
}}
<div class="course-info-container" id="course-info-container-{{id}}">
<div class="hidden-sm-up hidden-tablet hidden-phone">
<div class="d-sm-none d-lg-block">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-sm-down hidden-tablet hidden-desktop">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-xs-down hidden-md-up visible-tablet">
<div class="d-none d-sm-block d-lg-none visible-tablet">
<div class="media">
<div class="media-left">
<div class="media-left pr-3">
<div class="media-object">
{{> block_myoverview/progress-chart}}
</div>
Expand Down
28 changes: 11 additions & 17 deletions blocks/myoverview/templates/courses-view-course-item.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,21 @@
}
}}
<div class="col-lg-6">
<div class="card m-b-1 courses-view-course-item">
<div class="card-block course-info-container" id="course-info-container-{{id}}">
<div class="hidden-sm-up hidden-phone">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-xs-down visible-phone">
<div class="media">
<div class="media-left">
<div class="media-object">
{{> block_myoverview/progress-chart}}
</div>
</div>
<div class="media-body">
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="card mb-3 courses-view-course-item">
<div class="card-body course-info-container" id="course-info-container-{{id}}">

<div class="media">
<div class="mr-2">
{{> block_myoverview/progress-chart}}
</div>
<div class="media-body">
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
</div>

<p class="text-muted">
{{#shortentext}} 140, {{summary}}{{/shortentext}}
</p>
</div>
</div>
</div>
</div>
59 changes: 28 additions & 31 deletions blocks/myoverview/templates/courses-view.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,27 @@
}}
<div id="courses-view-{{uniqid}}" data-region="courses-view">
{{#hascourses}}
<div class="text-xs-center text-center">
<div class="btn-group m-y-2" role="group" data-toggle="btns">
<a class="btn btn-default active" href="#myoverview_courses_view_in_progress" data-toggle="tab">
{{#str}} inprogress, block_myoverview {{/str}}
</a>
<a class="btn btn-default" href="#myoverview_courses_view_future" data-toggle="tab">
{{#str}} future, block_myoverview {{/str}}
</a>
<a class="btn btn-default" href="#myoverview_courses_view_past" data-toggle="tab">
{{#str}} past, block_myoverview {{/str}}
</a>
</div>
<div class="d-flex justify-content-center">
<ul class="nav nav-pills my-5">
<li class="nav-item">
<a class="nav-link active" href="#myoverview_courses_view_in_progress" data-toggle="tab">
{{#str}} inprogress, block_myoverview {{/str}}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#myoverview_courses_view_future" data-toggle="tab">
{{#str}} future, block_myoverview {{/str}}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#myoverview_courses_view_past" data-toggle="tab">
{{#str}} past, block_myoverview {{/str}}
</a>
</li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane active fade in" id="myoverview_courses_view_in_progress">
<div class="tab-pane active fade show" id="myoverview_courses_view_in_progress">
{{#inprogress}}
{{< block_myoverview/courses-view-by-status }}
{{$id}}courses-view-in-progress{{/id}}
Expand All @@ -48,12 +54,12 @@
{{/ block_myoverview/courses-view-by-status }}
{{/inprogress}}
{{^inprogress}}
<div class="text-xs-center text-center m-t-3">
<div class="justify-content-center text-center mt-5">
<img class="empty-placeholder-image-lg"
src="{{urls.nocourses}}"
alt="{{#str}} nocoursesinprogress, block_myoverview {{/str}}"
role="presentation">
<p class="text-muted m-t-1">{{#str}} nocoursesinprogress, block_myoverview {{/str}}</p>
<p class="text-muted mt-3">{{#str}} nocoursesinprogress, block_myoverview {{/str}}</p>
</div>
{{/inprogress}}
</div>
Expand All @@ -67,12 +73,12 @@
{{/ block_myoverview/courses-view-by-status }}
{{/future}}
{{^future}}
<div class="text-xs-center text-center m-t-3">
<div class="justify-content-center text-center mt-5">
<img class="empty-placeholder-image-lg"
src="{{urls.nocourses}}"
alt="{{#str}} nocoursesfuture, block_myoverview {{/str}}"
role="presentation">
<p class="text-muted m-t-1">{{#str}} nocoursesfuture, block_myoverview {{/str}}</p>
<p class="text-muted mt-3">{{#str}} nocoursesfuture, block_myoverview {{/str}}</p>
</div>
{{/future}}
</div>
Expand All @@ -86,33 +92,24 @@
{{/ block_myoverview/courses-view-by-status }}
{{/past}}
{{^past}}
<div class="text-xs-center text-center m-t-3">
<div class="justify-content-center text-center mt-5">
<img class="empty-placeholder-image-lg"
src="{{urls.nocourses}}"
alt="{{#str}} nocoursespast, block_myoverview {{/str}}"
role="presentation">
<p class="text-muted m-t-1">{{#str}} nocoursespast, block_myoverview {{/str}}</p>
<p class="text-muted mt-3">{{#str}} nocoursespast, block_myoverview {{/str}}</p>
</div>
{{/past}}
</div>
</div>
{{/hascourses}}
{{^hascourses}}
<div class="text-xs-center text-center m-t-3">
<div class="justify-content-center text-center mt-5">
<img class="empty-placeholder-image-lg"
src="{{urls.nocourses}}"
alt="{{#str}} nocourses, block_myoverview {{/str}}"
role="presentation">
<p class="text-muted m-t-1">{{#str}} nocourses, block_myoverview {{/str}}</p>
<p class="text-muted mt-3">{{#str}} nocourses, block_myoverview {{/str}}</p>
</div>
{{/hascourses}}
</div>
{{#js}}
require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
var root = $('#courses-view-{{uniqid}}');
customEvents.define(root, [customEvents.events.activate]);
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
root.find('.btn.active').removeClass('active');
});
});
{{/js}}
</div>
2 changes: 1 addition & 1 deletion blocks/myoverview/templates/event-list-item.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="col-lg-5 text-xs-right text-lg-left text-truncate">
{{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
</div>
<div class="hidden-md-down col-lg-7 text-truncate">
<div class="hidden-md-down d-none d-md-block col-lg-7 text-truncate">
{{#action.actionable}}
<a href="{{{action.url}}}">{{action.name}}</a>
{{#action.itemcount}}
Expand Down
27 changes: 11 additions & 16 deletions blocks/myoverview/templates/timeline-view.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,27 @@
{}
}}
<div id="timeline-view-{{uniqid}}" data-region="timeline-view">
<div class="row text-xs-center">
<div class="btn-group m-t-2" role="group" data-toggle="btns">
<a class="btn btn-default active" href="#myoverview_timeline_dates" data-toggle="tab">
<div class="d-flex justify-content-center">
<ul class="nav nav-pills my-5">
<li class="nav-item">
<a class="nav-link active" href="#myoverview_timeline_dates" data-toggle="tab">
{{#str}} sortbydates, block_myoverview {{/str}}
</a>
<a class="btn btn-default" href="#myoverview_timeline_courses" data-toggle="tab">
</li>
<li class="nav-item">
<a class="nav-link" href="#myoverview_timeline_courses" data-toggle="tab">
{{#str}} sortbycourses, block_myoverview {{/str}}
</a>
</div>
</li>
</ul>
</div>

<div class="tab-content">
<div class="tab-pane active fade in" id="myoverview_timeline_dates">
<div class="tab-pane active fade show" id="myoverview_timeline_dates">
{{> block_myoverview/timeline-view-dates }}
</div>
<div class="tab-pane fade" id="myoverview_timeline_courses">
{{> block_myoverview/timeline-view-courses }}
</div>
</div>
</div>
{{#js}}
require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
var root = $('#timeline-view-{{uniqid}}');
customEvents.define(root, [customEvents.events.activate]);
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
root.find('.btn.active').removeClass('active');
});
});
{{/js}}
</div>
2 changes: 1 addition & 1 deletion blocks/tests/behat/behat_blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function i_open_the_blocks_action_menu($blockname) {
}

$this->execute('behat_general::i_click_on_in_the',
array("a[role='menuitem']", "css_element", $this->escape($blockname), "block")
array("a[role='button']", "css_element", $this->escape($blockname), "block")
);
}

Expand Down
6 changes: 3 additions & 3 deletions calendar/templates/month_detailed.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{{> core_calendar/header }}
{{> core_calendar/month_navigation }}
{{> core/overlay_loading}}
<table id="month-detailed-{{uniqid}}" class="calendarmonth calendartable card-deck m-b-0">
<table id="month-detailed-{{uniqid}}" class="calendarmonth calendartable m-b-0">
<thead>
<tr>
{{# daynames }}
Expand Down Expand Up @@ -71,7 +71,7 @@
data-drop-zone="month-view-day"
data-region="day"
data-new-event-timestamp="{{neweventtimestamp}}">
<div class="hidden-sm-down hidden-phone text-xs-center">
<div class="d-none d-md-block hidden-phone text-xs-center">
{{#hasevents}}
<a data-action="view-day-link" href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
{{/hasevents}}
Expand Down Expand Up @@ -119,7 +119,7 @@
</div>
{{/hasevents}}
</div>
<div class="hidden-md-up hidden-desktop hidden-tablet">
<div class="d-md-none hidden-desktop hidden-tablet">
{{#hasevents}}
<a data-action="view-day-link" href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
{{/hasevents}}
Expand Down
8 changes: 4 additions & 4 deletions course/classes/management_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function category_listing(coursecat $category = null) {
$listing = coursecat::get(0)->get_children();

$attributes = array(
'class' => 'ml',
'class' => 'ml-1',
'role' => 'tree',
'aria-labelledby' => 'category-listing-title'
);
Expand Down Expand Up @@ -288,7 +288,7 @@ public function category_listitem(coursecat $category, array $subcategories, $to
$html .= html_writer::end_div();
if ($isexpanded) {
$html .= html_writer::start_tag('ul',
array('class' => 'ml', 'role' => 'group', 'id' => 'subcategoryof'.$category->id));
array('class' => 'ml-1', 'role' => 'group', 'id' => 'subcategoryof'.$category->id));
$catatlevel = \core_course\management\helper::get_expanded_categories($category->path);
$catatlevel[] = array_shift($selectedcategories);
$catatlevel = array_unique($catatlevel);
Expand Down Expand Up @@ -528,7 +528,7 @@ public function course_listing(coursecat $category = null, course_in_list $cours
array('id' => 'course-listing-title', 'tabindex' => '0'));
$html .= $this->course_listing_actions($category, $course, $perpage);
$html .= $this->listing_pagination($category, $page, $perpage);
$html .= html_writer::start_tag('ul', array('class' => 'ml', 'role' => 'group'));
$html .= html_writer::start_tag('ul', array('class' => 'ml-1', 'role' => 'group'));
foreach ($category->get_courses($options) as $listitem) {
$html .= $this->course_listitem($category, $listitem, $courseid);
}
Expand Down Expand Up @@ -1109,7 +1109,7 @@ public function search_listing(array $courses, $totalcourses, course_in_list $co
));
$html .= html_writer::tag('h3', get_string('courses'));
$html .= $this->search_pagination($totalcourses, $page, $perpage);
$html .= html_writer::start_tag('ul', array('class' => 'ml'));
$html .= html_writer::start_tag('ul', array('class' => 'ml-1'));
foreach ($courses as $listitem) {
$i++;
if ($i == $totalcourses) {
Expand Down
Loading

0 comments on commit 6979cf5

Please sign in to comment.