Skip to content

Commit

Permalink
Implemented the kickstart-1.4 tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Nov 8, 2024
1 parent 05760ec commit 78707cc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 26 deletions.
1 change: 1 addition & 0 deletions lang/en/format_kickstart.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
$string['migratefromcourses'] = 'Migrate content from other courses';
$string['notemplates'] = 'No templates are available yet.';
$string['pluginname'] = 'Kickstart format';
$string['plugin_description'] = 'Create courses faster and make them more consistent across your organization using course templates.';
$string['previewurl'] = 'Preview URL';
$string['previewurl_help'] = 'If provided a button will display on the template that will open this URL in a new tab';
$string['privacy:metadata'] = 'The Kickstart format plugin does not store any personal data.';
Expand Down
27 changes: 19 additions & 8 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,28 @@ body.format-kickstart .form-control .fa-search {
}
.format-kickstart .course-content > .card .card-body {
text-align: right;
padding: 0;
display: flex;
align-items: center;
}
.format-kickstart .course-content > .card .card-body > .img-responsive + .card-title {
text-align: center;
float: none;
margin: 1rem 0;
}
.format-kickstart .course-content > .card .card-body .card-title {
text-align: left;
margin-top: 5px;
margin-bottom: 9px;
margin-right: 5px;
.format-kickstart .course-content > .card .card-body {
.card-title {
text-align: left;
margin-top: 5px;
margin-bottom: 9px;
margin-right: 5px;
}
a.btn {
margin-right: 5px;
&:not(.btn-outline-dark) {
margin-left: auto;
}
}
}
.format-kickstart .card-footer {
padding: .75rem 1.25rem;
Expand All @@ -152,14 +163,13 @@ body.format-kickstart .form-control .fa-search {
}

@media (min-width: 576px) {
.format-kickstart .mform > .form-group {
.mform > .form-group {
margin-left: 1.5rem;
}
.format-kickstart .course-content > .card .card-body .card-title {
float: left;
width: 66%;
}
}

body#page-course-format-kickstart-template.template-designer-format #fitem_id_coursetype {
display: none;
}
Expand All @@ -174,6 +184,7 @@ body#page-course-format-kickstart-template.template-designer-format #fitem_id_co
align-items: center;
}
.format-kickstart .course-content .kickstart-list-view .templates-block .card .card-body {
padding: 0;
display: flex;
align-items: center;
}
Expand Down
32 changes: 15 additions & 17 deletions tests/behat/format_kickstart_visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -122,43 +122,41 @@ Feature: Check the kickstart course format features.
Given I log in as "admin"
Then I navigate to "Plugins > Course formats > Manage templates" in site administration
And I should see "Kickstart format"
And I should see "Single activity format"
And I should see "Social format"
And I should see "Topics format"
And I should see "Weekly format"
And I should see "Single activity"
And I should see "Social"
And I should see "Custom sections"
And I should see "Weekly sections"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And I click on "Disable" "link" in the "Single activity format" "table_row"
And I click on "Disable" "link" in the "Single activity" "table_row"
Then I navigate to "Plugins > Course formats > Manage templates" in site administration
And I should not see "Single activity format"
And I should not see "Single activity"
Then I am on "Course 1" course homepage
Then I should see "Course templates"
And I should not see "Single activity format"
Then I should see "Topics format"
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I should not see "Single activity"
Then I should see "Custom sections"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
Then I should see "Course 1"
Then ".course-content .topics" "css_element" should exist
And I navigate to "Plugins > Course formats > Manage templates" in site administration
Then I click on "Edit" "button" in the "Topics format" "table_row"
Then I click on "Edit" "button" in the "Custom sections" "table_row"
And I should see "Edit template"
And I set the following fields to these values:
| Course layout | Show one section per page |
Then I press "Save changes"
Then I am on "Course 2" course homepage
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
#And I start watching to see if a new page loads
Then I should see "Course 2"
Then ".course-content .topics" "css_element" should exist
And I follow "Topic 1"
Then ".single-section" "css_element" should exist

Scenario: Check the visible course templates in different roles
Given I log in as "user1"
Then I am on "Course 1" course homepage
Then I should see "Course templates"
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
Then I should see "Course 1"
Expand All @@ -168,16 +166,16 @@ Feature: Check the kickstart course format features.
Given I log in as "admin"
And I am on "Course 3" course homepage with editing mode on
Then I should see "Course templates"
And I should see "Single activity format"
And I click kickstart template ".use-template[data-templatename=\"Single activity format\"]"
And I should see "Single activity"
And I click kickstart template ".use-template[data-templatename=\"Single activity\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
And I set the following fields to these values:
| Forum name | Test Forum |
Then I press "Save and display"
Then I should see "There are no discussion topics yet in this forum"
And I navigate to "Plugins > Course formats > Manage templates" in site administration
Then I click on "Edit" "button" in the "Single activity format" "table_row"
Then I click on "Edit" "button" in the "Single activity" "table_row"
And I should see "Edit template"
And I set the following fields to these values:
| Type of activity | Page |
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024101700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2024110800; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2022041900; // Requires this Moodle version.
$plugin->release = 'Version 1.3';
$plugin->component = 'format_kickstart'; // Full name of the plugin (used for diagnostics).
Expand Down

0 comments on commit 78707cc

Please sign in to comment.