Commit 0f049286 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'MDL-65448-master' of git://github.com/lucaboesch/moodle

parents 149fdcf0 531ce529
......@@ -88,7 +88,6 @@ class block_site_main_menu extends block_list {
$section = $modinfo->get_section_info(0);
if ($ismoving) {
$strmovehere = get_string('movehere');
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
} else {
......@@ -128,8 +127,9 @@ class block_site_main_menu extends block_list {
if ($mod->id == $USER->activitycopy) {
continue;
}
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$movingurl = new moodle_url('/course/mod.php', array('moveto' => $mod->id, 'sesskey' => sesskey()));
$this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull,
'class' => 'movehere'));
$this->content->icons[] = '';
}
if ($mod->indent > 0) {
......@@ -148,8 +148,8 @@ class block_site_main_menu extends block_list {
}
if ($ismoving) {
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey()));
$this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere'));
$this->content->icons[] = '';
}
......
......@@ -83,7 +83,6 @@ class block_social_activities extends block_list {
$section = $modinfo->get_section_info(0);
if ($ismoving) {
$strmovehere = get_string('movehere');
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
} else {
......@@ -92,7 +91,8 @@ class block_social_activities extends block_list {
if ($ismoving) {
$this->content->icons[] = '&nbsp;' . $OUTPUT->pix_icon('t/move', get_string('move'));
$this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&amp;sesskey='.sesskey().'">'.$strcancel.'</a>)';
$cancelurl = new moodle_url('/course/mod.php', array('cancelcopy' => 'true', 'sesskey' => sesskey()));
$this->content->items[] = $USER->activitycopyname . '&nbsp;(<a href="' . $cancelurl . '">' . $strcancel . '</a>)';
}
if (!empty($modinfo->sections[0])) {
......@@ -123,8 +123,9 @@ class block_social_activities extends block_list {
if ($mod->id == $USER->activitycopy) {
continue;
}
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$movingurl = new moodle_url('/course/mod.php', array('moveto' => $mod->id, 'sesskey' => sesskey()));
$this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull,
'class' => 'movehere'));
$this->content->icons[] = '';
}
if (!$mod->url) {
......@@ -140,8 +141,8 @@ class block_social_activities extends block_list {
}
if ($ismoving) {
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey()));
$this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere'));
$this->content->icons[] = '';
}
......
......@@ -1004,7 +1004,6 @@ class core_course_renderer extends plugin_renderer_base {
// check if we are currently in the process of moving a module with JavaScript disabled
$ismoving = $this->page->user_is_editing() && ismoving($course->id);
if ($ismoving) {
$movingpix = new pix_icon('movehere', get_string('movehere'), 'moodle', array('class' => 'movetarget'));
$strmovefull = strip_tags(get_string("movefull", "", "'$USER->activitycopyname'"));
}
......@@ -1032,7 +1031,7 @@ class core_course_renderer extends plugin_renderer_base {
if ($ismoving) {
$movingurl = new moodle_url('/course/mod.php', array('moveto' => $modnumber, 'sesskey' => sesskey()));
$sectionoutput .= html_writer::tag('li',
html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)),
html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')),
array('class' => 'movehere'));
}
......@@ -1042,7 +1041,7 @@ class core_course_renderer extends plugin_renderer_base {
if ($ismoving) {
$movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey()));
$sectionoutput .= html_writer::tag('li',
html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)),
html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')),
array('class' => 'movehere'));
}
}
......
......@@ -233,7 +233,6 @@ class grade_edit_tree {
if ($this->moving && $this->moving != $child_eid) {
$strmove = get_string('move');
$strmovehere = get_string('movehere');
$actions = $moveaction = ''; // no action icons when moving
$aurl = new moodle_url('index.php', array('id' => $COURSE->id, 'action' => 'move', 'eid' => $this->moving, 'moveafter' => $child_eid, 'sesskey' => sesskey()));
......@@ -245,8 +244,7 @@ class grade_edit_tree {
$cell->colspan = 12;
$cell->attributes['class'] = 'movehere level' . ($level + 1) . ' level' . ($level % 2 ? 'even' : 'odd');
$icon = new pix_icon('movehere', $strmovehere, null, array('class'=>'movetarget'));
$cell->text = $OUTPUT->action_icon($aurl, $icon);
$cell->text = html_writer::link($aurl, '', array('title' => get_string('movehere'), 'class' => 'movehere'));
$moveto = new html_table_row(array($cell));
}
......
......@@ -219,6 +219,19 @@ div.dropdown-item {
padding: 0;
}
.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed $gray-800;
margin: 4px 0;
}
.editing .course-content .hidden.sectionname {
visibility: hidden;
display: initial;
}
.inline,
.inline-list li {
display: inline;
......
......@@ -276,6 +276,17 @@
padding-left: 24px;
}
td.movehere {
padding: 0;
}
td.movehere a.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed $gray-800;
}
.category input[type="text"],
.category .column-range,
.categoryitem,
......
......@@ -41,10 +41,6 @@ $iconsizes: map-merge((
height: $icon-big-height;
font-size: $icon-big-height;
}
&.movetarget {
width: 80px;
}
}
.navbar-dark a .icon {
......
......@@ -9840,6 +9840,17 @@ div.dropdown-item:focus-within {
margin: 0;
padding: 0; }
.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed #343a40;
margin: 4px 0; }
.editing .course-content .hidden.sectionname {
visibility: hidden;
display: initial; }
.inline,
.inline-list li {
display: inline; }
......@@ -11874,8 +11885,6 @@ input[disabled] {
width: 64px;
height: 64px;
font-size: 64px; }
.icon.movetarget {
width: 80px; }
.navbar-dark a .icon {
color: rgba(255, 255, 255, 0.5) !important;
......@@ -18351,6 +18360,15 @@ p.arrow_button {
.path-grade-edit-tree .setup-grades td.column-name {
padding-left: 24px; }
.path-grade-edit-tree .setup-grades td.movehere {
padding: 0; }
.path-grade-edit-tree .setup-grades td.movehere a.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed #343a40; }
.path-grade-edit-tree .setup-grades .category input[type="text"],
.path-grade-edit-tree .setup-grades .category .column-range,
.path-grade-edit-tree .setup-grades .categoryitem,
......
......@@ -10044,6 +10044,17 @@ div.dropdown-item:focus-within {
margin: 0;
padding: 0; }
.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed #343a40;
margin: 4px 0; }
.editing .course-content .hidden.sectionname {
visibility: hidden;
display: initial; }
.inline,
.inline-list li {
display: inline; }
......@@ -12087,8 +12098,6 @@ input[disabled] {
width: 64px;
height: 64px;
font-size: 64px; }
.icon.movetarget {
width: 80px; }
.navbar-dark a .icon {
color: rgba(255, 255, 255, 0.5) !important;
......@@ -18583,6 +18592,15 @@ p.arrow_button {
.path-grade-edit-tree .setup-grades td.column-name {
padding-left: 24px; }
.path-grade-edit-tree .setup-grades td.movehere {
padding: 0; }
.path-grade-edit-tree .setup-grades td.movehere a.movehere {
display: block;
width: 100%;
height: 2rem;
border: 2px dashed #343a40; }
.path-grade-edit-tree .setup-grades .category input[type="text"],
.path-grade-edit-tree .setup-grades .category .column-range,
.path-grade-edit-tree .setup-grades .categoryitem,
......
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