Skip to content

Commit

Permalink
Merge pull request #23 from bdecentgmbh/dev
Browse files Browse the repository at this point in the history
Merge to main for 1.5 release
  • Loading branch information
stefanscholz authored Nov 23, 2023
2 parents 731f362 + 311ee06 commit 2bb4b21
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 63 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:

services:
postgres:
image: postgres:12.7
image: postgres:13
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
mariadb:
image: mariadb:10.5
image: mariadb:10.6.7
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand All @@ -29,13 +29,13 @@ jobs:
matrix:
include:
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
moodle-branch: 'MOODLE_403_STABLE'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
moodle-branch: 'MOODLE_402_STABLE'
database: 'mariadb'
- php: '7.4'
moodle-branch: 'MOODLE_400_STABLE'
- php: '8.0'
moodle-branch: 'MOODLE_401_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_400_STABLE'
Expand Down
2 changes: 1 addition & 1 deletion amd/build/designer_section.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/designer_section.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ public function render_section_data(section_info $section, stdClass $course, $on
if ($thismod->uservisible) {
if (isset($mods[$thismod->modname])) {
$mods[$thismod->modname]['name'] = $thismod->modplural;
if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/monologo.png')) {
if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/monologo.svg')) {
$mods[$thismod->modname]['activityimgsvg'] = file_get_contents($CFG->dirroot.'/mod/'.$thismod->modname.
'/pix/monologo.svg');
} else if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/icon.png')) {
Expand All @@ -858,7 +858,7 @@ public function render_section_data(section_info $section, stdClass $course, $on
$mods[$thismod->modname]['count']++;
} else {
$mods[$thismod->modname]['name'] = $thismod->modfullname;
if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/monologo.png')) {
if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/monologo.svg')) {
$mods[$thismod->modname]['activityimgsvg'] = file_get_contents($CFG->dirroot.'/mod/'.$thismod->modname.
'/pix/monologo.svg');
} else if (file_exists($CFG->dirroot.'/mod/'.$thismod->modname.'/pix/icon.png')) {
Expand Down
4 changes: 4 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,9 @@ function format_designer_editsetting_style($page) {
$style .= '.format-designer .designer .section .activity .actions .menubar .dropdown .dropdown-menu {';
$style .= 'top: -50px !important;left: auto !important;right: 40px !important;transform: none !important;';
$style .= '}';
$style .= '.format-designer .course-content ul.designer li.section .right .dropdown.designer-menu .dropdown-menu {';
$style .= 'top: -90px !important;';
$style .= '}';
echo html_writer::tag('style', $style, []);
}
}
Expand Down Expand Up @@ -2030,6 +2033,7 @@ function format_designer_extend_navigation_course($navigation, $course, $context

$designerpro = 0;
$prerequisitebnewtab = 0;
$courseprerequisitepos = 0;
if (format_designer_has_pro()) {
$course = course_get_format($course->id)->get_course();
$prerequisitebnewtab = $course->prerequisitesnewtab;
Expand Down
67 changes: 35 additions & 32 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@
.format-designer ul.designer .card.card-list.restricted {
border-color: #ccc;
}
/* .format-designer ul.designer .card-layout .card.card-list .card-body .mod-indent-outer > div {
position: relative;
} */
.format-designer ul.designer .card.card-list .card-body .mod-indent-outer .completion-info {
text-align: center;
margin-bottom: 5px;
Expand Down Expand Up @@ -235,7 +232,8 @@
padding: 15px;
margin-bottom: 15px;
}
.format-designer .course-content .single-section-layout:not(.section-page-layout) ul.designer.course-type-normal li.section.main .section-content-wrapper {
.format-designer .course-content .single-section-layout:not(.section-page-layout) ul.designer.course-type-normal
li.section.main .section-content-wrapper {
height: 100%;
border: 1px solid #eee;
cursor: pointer;
Expand Down Expand Up @@ -269,14 +267,6 @@
margin: 0 0 0 10px;
float: left;
}
/* .format-designer .course-content ul.designer.course-type-normal li.section .section-header-content a.goto-section:after {
content: '\f061';
font-size: 24px;
font-family: 'FontAwesome';
text-indent: 0;
margin: 0 0 0 10px;
float: left;
} */
.format-designer #goto-top-link {
z-index: 1;
}
Expand All @@ -292,17 +282,20 @@ body.format-designer #page.drawers .main-inner .header-maxwidth {
body.format-designer.path-admin #page.drawers .main-inner .header-maxwidth {
padding: 0 20px;
}
.format-designer .course-content ul.designer li.section .section-content-wrapper.section-progress-info-completed .section-progress-info {
.format-designer .course-content ul.designer li.section .section-content-wrapper.section-progress-info-completed
.section-progress-info {
width: auto;
}

/* Section activities lists */
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content .section-summary-activities {
width: 80%;
margin-top: 20px;
display: inline-flex;
flex-wrap: wrap;
}
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content .section-summary-activities .img-element {
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content
.section-summary-activities .img-element {
width: 40px;
height: 40px;
line-height: 35px;
Expand All @@ -313,10 +306,17 @@ body.format-designer.path-admin #page.drawers .main-inner .header-maxwidth {
margin-bottom: 10px;
position: relative;
}
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content .section-summary-activities .img-element img {
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content
.section-summary-activities .img-element img {
width: 16px;
}
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content .section-summary-activities .img-element .activity-count {
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content
.section-summary-activities .img-element svg {
width: 24px;
height: 24px;
}
.format-designer .course-content ul.designer.course-type-normal li.section .section-header-content
.section-summary-activities .img-element .activity-count {
width: 20px;
height: 20px;
line-height: 20px;
Expand Down Expand Up @@ -518,9 +518,6 @@ body.format-designer.editing ul.designer .section .circles-layout .activity .edi
left: 0;
z-index: -1;
}
.format-designer .course-content ul.designer.course-type-flow li.section.main .section-background-style.section-design-whole {
z-index: 0;
}
.format-designer .course-content ul.designer li.section.main
.section-background-style.section-design-whole .mask-inner-section,
.format-designer .course-content ul.designer li.section .section-header-content
Expand Down Expand Up @@ -633,9 +630,9 @@ span.section-collapse-icon:before,
span.section-collapse-icon:before {
content: '\f107';
width: 20px;
font-family: 'FontAwesome';
font-family: var(--fa-style-family, "Font Awesome 6 Free", fontawesome);
font-weight: var(--fa-style, 900);
font-size: 24px;
font-weight: bold;
line-height: 32px;
text-align: center;
margin-right: 10px;
Expand Down Expand Up @@ -1219,7 +1216,8 @@ span.section-collapse-icon:before {
.format-designer .designer .section .content .section.link-layout li.activity .mod-indent-outer .activityinstance .activitytitle {
z-index: 0;
}
.format-designer .designer .section .content .section.link-layout li.activity .mod-indent-outer .activityinstance .activitytitle .img-element {
.format-designer .designer .section .content .section.link-layout li.activity .mod-indent-outer .activityinstance
.activitytitle .img-element {
margin-top: 22px;
}
.format-designer.editing .designer .section .content .section.link-layout li.activity .mod-indent-outer {
Expand Down Expand Up @@ -2094,7 +2092,7 @@ body.format-designer.editing .designer .section .content .section.card-layout li
}
.format-designer .designer .section-design-whole .mod-content .trim-summary a,
.format-designer .designer .section-design-header .mod-content .trim-summary a {
color: var(--sectioncolor);
/* color: var(--sectioncolor); */
cursor: zoom-in;
}
.format-designer .designer .section-design-whole .mod-content .fullcontent-summary a,
Expand Down Expand Up @@ -2173,7 +2171,8 @@ body.format-designer.editing .designer .section .content .section.card-layout li
}
.format-designer .course-info-block .carousel .carousel-control:before {
content: '\f104';
font-family: fontawesome;
font-family: var(--fa-style-family, "Font Awesome 6 Free", fontawesome);
font-weight: var(--fa-style, 900);
color: #fff;
}
.format-designer .course-info-block .carousel .carousel-control-next:before {
Expand Down Expand Up @@ -2279,7 +2278,7 @@ body.format-designer.editing .designer .section .content .section.card-layout li
}
}

@media (min-width: 1200px) and (max-width: 1550px){
@media (min-width: 1200px) and (max-width: 1550px) {
.format-designer .course-info-block > div {
width: 20%;
}
Expand Down Expand Up @@ -2944,11 +2943,10 @@ body.format-designer.editing .designer .section .content .section.card-layout li
height: auto;
}
.format-designer .course-content ul.designer.course-type-flow {
/* display: contents; */
margin-top: 30px;
}
.format-designer .course-content ul.course-type-flow.designer .section.main .section-content-wrapper {
/* display: contents; */
display: contents;
position: relative;
}
.format-designer .course-content ul.designer.course-type-flow li.section ul.section.img-text li.activity {
Expand Down Expand Up @@ -2985,7 +2983,8 @@ body.format-designer.editing .designer .section .content .section.card-layout li
bottom: 10px;
right: 10px;
}
.format-designer .course-content ul.designer.course-type-flow li.section .section-header-content .section-progress-info > div:not(.progress-donut) .progress {
.format-designer .course-content ul.designer.course-type-flow li.section .section-header-content
.section-progress-info > div:not(.progress-donut) .progress {
height: 12px;
background: #fff;
}
Expand Down Expand Up @@ -3157,17 +3156,20 @@ li.section.main.section-background-color:not(.section-header-image)

@media (min-width: 992px) {
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-small,
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-small.flow-stack.collapsed {
.format-designer .course-content ul.course-type-flow.designer .section.main
.section-header-content.flow-card-small.flow-stack.collapsed {
width: 320px;
min-height: 320px;
}
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-medium,
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-medium.flow-stack.collapsed {
.format-designer .course-content ul.course-type-flow.designer .section.main
.section-header-content.flow-card-medium.flow-stack.collapsed {
width: 360px;
min-height: 360px;
}
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-large,
.format-designer .course-content ul.course-type-flow.designer .section.main .section-header-content.flow-card-large.flow-stack.collapsed {
.format-designer .course-content ul.course-type-flow.designer .section.main
.section-header-content.flow-card-large.flow-stack.collapsed {
width: 400px;
min-height: 400px;
}
Expand All @@ -3183,7 +3185,8 @@ li.section.main.section-background-color:not(.section-header-image)
.format-designer .designer.course-type-flow .section .content .section.card-layout li.activity.flow-card-small .card.card-list {
min-height: 320px;
}
.format-designer .designer.course-type-flow .section .content .section.card-layout li.activity.flow-card-medium .card.card-list {
.format-designer .designer.course-type-flow .section .content .section.card-layout li.activity.flow-card-medium
.card.card-list {
min-height: 360px;
}
.format-designer .designer.course-type-flow .section .content .section.card-layout li.activity.flow-card-large .card.card-list {
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/activity_completion_element.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Feature: Sections can be check activity completion element in designer format

Scenario: Check the manual mark completion the activity
Given I am on the "Test assignment name" "assign activity editing" page logged in as teacher1
And I follow "Expand all"
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
And I expand all fieldsets
And I set student complete the activity completion condition manually
And I press "Save and return to course"
And I log out
And I log in as "student1"
Expand Down
14 changes: 14 additions & 0 deletions tests/behat/behat_format_designer.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,18 @@ public function i_turn_block_editing_mode_on() {
}
}

/**
* Set the manually student complete the activity condition.
* @Given I set student complete the activity completion condition manually
*/
public function i_set_student_complete_the_activity_condition_manually() {
global $CFG;

if ($CFG->branch == "403") {
$this->execute('behat_forms::i_set_the_field_to', ['id_completion_1', '1']);
} else {
$this->execute('behat_forms::i_set_the_field_to',
['Completion tracking', 'Students can manually mark the activity as completed']);
}
}
}
2 changes: 1 addition & 1 deletion tests/behat/course_types.feature
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Feature: Users can choose different course types.
Then I should not see "Course" in the ".secondary-navigation" "css_element"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I follow "Expand all"
And I expand all fieldsets
And I set the following fields to these values:
| Add course to secondary menu item on all course pages | 1 |
And I press "Save and display"
Expand Down
Loading

0 comments on commit 2bb4b21

Please sign in to comment.