Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Framework Version 6 Prototype #3324

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# Ignore library files.
/src/core/libraries/*.js

# Ignore built output.
/build/
!**/src/node_modules/adapt-*/
36 changes: 29 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
"plugin:react/recommended"
],
"globals": {
"Promise": true,
"requirejs": true,
"Backbone": true,
"$": true,
"ENUM": true,
"Modernizr": true,
"_": true,
"Handlebars": true,
"Backbone": "off",
"$": "off",
"ENUM": "off",
"Modernizr": "off",
"_": "off",
"Handlebars": "off",
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
Expand All @@ -31,6 +30,29 @@
"requirejs"
],
"rules": {
"no-restricted-globals": [
"error",
{
"name": "ENUM",
"message": "Use: import ENUM from 'enum';"
},
{
"name": "Backbone",
"message": "Use: import Backbone from 'backbone';"
},
{
"name": "Handlebars",
"message": "Use: import Handlebars from 'handlebars';"
},
{
"name": "_",
"message": "Use: import _ from 'underscore';"
},
{
"name": "$",
"message": "Use: import $ from 'jquery';"
}
],
"indent": ["error", 2, { "SwitchCase": 1 }],
"array-bracket-spacing": "off",
"semi": ["error", "always"],
Expand Down
17 changes: 6 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
src/components
src/theme
src/menu
src/extensions
src/less
src/less/adapt.less
src/plugins.js
build
bower_components
build/*
!build/course
!build/course/*
build/course/*/language_data_manifest.js
node_modules
.DS_Store
.idea
src/node_modules/
src/package-lock.json
5 changes: 0 additions & 5 deletions .gitmodules

This file was deleted.

8 changes: 3 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var path = require('path');
const path = require('path');

module.exports = function(grunt) {
var helpers = require('./grunt/helpers')(grunt);

const helpers = require('./grunt/helpers')(grunt);
grunt.option('helpers', helpers);
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
data: helpers.generateConfigData(),
Expand All @@ -14,7 +14,5 @@ module.exports = function(grunt) {
}
}
});

grunt.config('helpers', helpers);
grunt.registerTask('default', ['help']);
};
1 change: 1 addition & 0 deletions build/course/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_defaultLanguage":"en","_defaultDirection":"ltr","_questionWeight":1,"_logging":{"_isEnabled":true,"_level":"debug","_console":true,"_warnFirstOnly":true},"_accessibility":{"_isEnabled":true,"_isSkipNavigationEnabled":true,"_ariaLevels":{"_menu":1,"_menuGroup":2,"_menuItem":2,"_page":1,"_article":2,"_block":3,"_component":4,"_componentItem":5,"_notify":1},"_options":{"_isFocusOutlineKeyboardOnlyEnabled":true,"_isFocusOutlineDisabled":false,"_isFocusAssignmentEnabled":true,"_isFocusOnClickEnabled":true,"_isFocusNextOnDisabled":true,"_isScrollDisableEnabled":true,"_isAriaHiddenManagementEnabled":true,"_isPopupManagementEnabled":true,"_isPopupWrapFocusEnabled":true,"_isPopupAriaHiddenManagementEnabled":true,"_isPopupTabIndexManagementEnabled":true,"_warn":true,"_warnFirstOnly":true}},"_fixes":{"_imgLazyLoad":true},"_drawer":{"_showEasing":"easeOutQuart","_hideEasing":"easeInQuart","_duration":400},"_completionCriteria":{"_requireContentCompleted":false,"_requireAssessmentCompleted":true,"_shouldSubmitScore":true},"_spoor":{"_isEnabled":true,"_tracking":{"_shouldStoreResponses":true,"_shouldStoreAttempts":false,"_shouldRecordInteractions":true},"_reporting":{"_comment":"Your options here are 'completed', 'passed', 'failed', and 'incomplete'","_onTrackingCriteriaMet":"completed","_onAssessmentFailure":"incomplete","_resetStatusOnLanguageChange":false}},"_disableAnimationFor":[],"_disableAnimation":false,"_scrollingContainer":{"_isEnabled":false,"_limitToSelector":""},"build":{"strictMode":true}}
1 change: 1 addition & 0 deletions build/course/en/articles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"_id":"a-05","_parentId":"co-05","_type":"article","_classes":"","title":"a-05","displayTitle":"","body":"","instruction":""},{"_id":"a-10","_parentId":"co-10","_type":"article","_classes":"","title":"a-10","displayTitle":"","body":"","instruction":""},{"_id":"a-15","_parentId":"co-15","_type":"article","_classes":"","title":"a-15","displayTitle":"","body":"","_assessment":{"_isEnabled":true,"_id":"a-15","_isPercentageBased":true,"_scoreToPass":75,"_includeInTotalScore":true,"_assessmentWeight":1,"_suppressMarking":false,"_allowResetIfPassed":false,"_banks":{"_isEnabled":true,"_split":"2,2","_randomisation":true},"_questions":{"_resetType":"hard","_canShowFeedback":false,"_canShowMarking":false,"_canShowModelAnswer":false},"_isResetOnRevisit":true,"_attempts":"infinite"},"_trickle":{"_isEnabled":true,"_button":{"_isEnabled":true,"startText":"Continue"}}},{"_id":"a-20","_parentId":"co-15","_type":"article","_classes":"","title":"a-20","displayTitle":"","body":""}]
1 change: 1 addition & 0 deletions build/course/en/blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"_id":"b-05","_parentId":"a-05","_type":"block","_classes":"","title":"b-05","displayTitle":"","body":"","instruction":"","_trackingId":0,"_onScreen":{"_isEnabled":true,"_classes":"fade-in-bottom","_percentInviewVertical":50}},{"_id":"b-10","_parentId":"a-05","_type":"block","_classes":"","title":"b-10","displayTitle":"","body":"","instruction":"","_trackingId":1},{"_id":"b-15","_parentId":"a-05","_type":"block","_classes":"","title":"b-15","displayTitle":"","body":"","instruction":"","_trackingId":2},{"_id":"b-20","_parentId":"a-05","_type":"block","_classes":"","title":"b-20","displayTitle":"","body":"","instruction":"","_trackingId":3},{"_id":"b-25","_parentId":"a-05","_type":"block","_classes":"","title":"b-25","displayTitle":"","body":"","_trackingId":4},{"_id":"b-30","_parentId":"a-05","_type":"block","_classes":"","title":"b-30","displayTitle":"","body":"","_trackingId":5},{"_id":"b-35","_parentId":"a-05","_type":"block","_classes":"","title":"b-35","displayTitle":"","body":"","_trackingId":6},{"_id":"b-40","_parentId":"a-10","_type":"block","_classes":"","title":"b-40","displayTitle":"","body":"","_trackingId":7},{"_id":"b-45","_parentId":"a-10","_type":"block","_classes":"","title":"b-45","displayTitle":"","body":"","_trackingId":8},{"_id":"b-50","_parentId":"a-10","_type":"block","_classes":"","title":"b-50","displayTitle":"","body":"","_trackingId":9},{"_id":"b-55","_parentId":"a-10","_type":"block","_classes":"","title":"b-55","displayTitle":"","body":"","_trackingId":10},{"_id":"b-60","_parentId":"a-10","_type":"block","_classes":"","title":"b-60","displayTitle":"","body":"","_trackingId":11},{"_id":"b-65","_parentId":"a-15","_type":"block","_classes":"","title":"b-65","displayTitle":"","body":"","_assessment":{"_quizBankID":1},"_trackingId":12},{"_id":"b-75","_parentId":"a-15","_type":"block","_classes":"","title":"b-75","displayTitle":"","body":"","_assessment":{"_quizBankID":1},"_trackingId":13},{"_id":"b-80","_parentId":"a-15","_type":"block","_classes":"","title":"b-80","displayTitle":"","body":"","_assessment":{"_quizBankID":1},"_trackingId":14},{"_id":"b-85","_parentId":"a-15","_type":"block","_classes":"","title":"b-85","displayTitle":"","body":"","_assessment":{"_quizBankID":2},"_trackingId":15},{"_id":"b-90","_parentId":"a-15","_type":"block","_classes":"","title":"b-90","displayTitle":"","body":"","_assessment":{"_quizBankID":2},"_trackingId":16},{"_id":"b-95","_parentId":"a-15","_type":"block","_classes":"","title":"b-95","displayTitle":"","body":"","_assessment":{"_quizBankID":2},"_trackingId":17},{"_id":"b-100","_parentId":"a-20","_type":"block","_classes":"background-color-inverted","title":"b-100","displayTitle":"","body":"","_trickle":{"_isEnabled":true,"_button":{"_isEnabled":true,"text":"Show results"}},"_trackingId":18},{"_id":"b-105","_parentId":"a-20","_type":"block","_classes":"","title":"b-105","displayTitle":"","body":"","_trackingId":19}]
1 change: 1 addition & 0 deletions build/course/en/components.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/course/en/contentObjects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"_id":"co-05","_parentId":"course","_type":"page","_classes":"","_htmlClasses":"","title":"Presentation Components","displayTitle":"Presentation Components","body":"Find out what presentation components are available within the core bundle and how you might consider using them within your courses.","pageBody":"","instruction":"Scroll down to see what presentation components are available as part of the v5 core bundle.","_graphic":{"src":"course/en/images/menu-item.png","alt":""},"linkText":"View","duration":"2 mins","_pageLevelProgress":{"_isEnabled":true,"_showPageCompletion":false,"_excludeAssessments":false,"_isCompletionIndicatorEnabled":false}},{"_id":"co-10","_parentId":"course","_type":"page","_classes":"","_htmlClasses":"","title":"Question Components","displayTitle":"Question Components","body":"Discover what question components are available within the framework, along with some tips on how to use them.","pageBody":"Without a range of question components, we can’t easily measure if learners are meeting the intended course objectives, provide guidance and feedback if they’re not, or give them opportunities to practise in a ‘safe environment’.<br><br>Discover what question components are available within the framework, along with some tips on how to use them.","instruction":"Scroll down to see what question components are available as part of the v5 core bundle.","_graphic":{"src":"course/en/images/menu-item.png","alt":""},"linkText":"View","duration":"2 mins","_pageLevelProgress":{"_isEnabled":true,"_showPageCompletion":false,"_excludeAssessments":false,"_isCompletionIndicatorEnabled":false}},{"_id":"co-15","_parentId":"course","_type":"page","_classes":"assessment","_htmlClasses":"","title":"Adapt Assessment","displayTitle":"Adapt Assessment","body":"Find out more about the assessment functionality introduced in Adapt v2, including randomised banks and an improved results feature.","pageBody":"We’ve put together a very short quiz to demonstrate the new assessment functionality. In this simple example there are two banks that each contain three questions with two being taken from each bank at random. The order in which the questions are presented is then also randomised, as is the order of each question’s options.","instruction":"Think you can get a perfect score? Scroll down to attempt the first question.","_graphic":{"src":"course/en/images/menu-item.png","alt":""},"linkText":"View","duration":"2 mins","_pageLevelProgress":{"_isEnabled":true,"_showPageCompletion":false,"_excludeAssessments":false,"_isCompletionIndicatorEnabled":false}}]
253 changes: 253 additions & 0 deletions build/course/en/course.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
{
"_id": "course",
"_type": "course",
"_classes": "",
"_htmlClasses": "",
"title": "Adapt v6",
"displayTitle": "Adapt Version 6",
"description": "A sample course demonstrating the capabilities of the Adapt Framework",
"body": "Welcome to the demonstration build for version 6 of the Adapt framework.",
"instruction": "",
"_buttons": {
"_submit": {
"buttonText": "Submit",
"ariaLabel": "Submit"
},
"_reset": {
"buttonText": "Reset",
"ariaLabel": "Reset"
},
"_showCorrectAnswer": {
"buttonText": "Show correct answer",
"ariaLabel": "Show correct answer"
},
"_hideCorrectAnswer": {
"buttonText": "Show your answer",
"ariaLabel": "Show your answer"
},
"_showFeedback": {
"buttonText": "Show feedback",
"ariaLabel": "Show feedback"
},
"remainingAttemptsText": "attempts remaining",
"remainingAttemptText": "final attempt",
"disabledAriaLabel": "This button is disabled at the moment"
},
"_globals": {
"_learnerInfo": {
"id": "[email protected]",
"name": "Name, Student",
"firstname": "Student",
"lastname": "Name"
},
"_accessibility": {
"skipNavigationText": "Skip navigation",
"_ariaLabels": {
"answeredIncorrectly": "You answered incorrectly",
"answeredCorrectly": "You answered correctly",
"selectedAnswer": "selected",
"unselectedAnswer": "not selected",
"skipNavigation": "Skip Navigation",
"previous": "Back",
"navigationDrawer": "Open course resources.",
"close": "Close",
"closeDrawer": "Close drawer",
"closeResources": "Close resources",
"drawer": "Top of side drawer",
"closePopup": "Close popup",
"next": "Next",
"done": "Done",
"complete": "Completed",
"incomplete": "Incomplete",
"incorrect": "Incorrect",
"correct": "Correct",
"locked": "Locked",
"visited": "Visited"
}
},
"_extensions": {
"_drawer": {
"_navOrder": 0
},
"_languagePicker": {
"navigationBarLabel": "Select course language",
"languageSelector": "Language selector"
},
"_pageLevelProgress": {
"pageLevelProgress": "Page sections",
"pageLevelProgressIndicatorBar": "Page progress. Use this to listen to the list of regions in this topic and whether they're completed. You can jump directly to any that are incomplete or which sound particularly interesting. {{percentageComplete}}%",
"pageLevelProgressMenuBar": "Page completion {{percentageComplete}}%",
"pageLevelProgressEnd": "You have reached the end of the list of page sections.",
"optionalContent": "Optional content",
"_navOrder": 0
},
"_resources": {
"resources": "Additional resources."
},
"_trickle": {
"incompleteContent": "There is incomplete content above. You must complete this before you can proceed through the course."
},
"_tutor": {
"hideFeedback": "Hide feedback"
}
},
"_components": {
"_accordion": {
"ariaRegion": "List of expandable sections. Select each button to expand the content."
},
"_assessmentResults": {
"ariaRegion": "Assessment results."
},
"_gmcq": {
"ariaRegion": "Multiple choice question",
"ariaCorrectAnswer": "The correct answer is {{{correctAnswer}}}",
"ariaCorrectAnswers": "The correct answers are {{{correctAnswer}}}",
"ariaUserAnswer": "The answer you chose was {{{userAnswer}}}",
"ariaUserAnswers": "The answers you chose were {{{userAnswer}}}"
},
"_graphic": {
"ariaRegion": "",
"scrollAriaLabel": "Use the scrollbar to pan the image left and right. {{#if _graphic.alt}}{{_graphic.alt}}{{/if}}"
},
"_hotgraphic": {
"ariaRegion": "Image with selectable areas. Select each button to show more information.",
"popupPagination": "{{itemNumber}} / {{totalItems}}"
},
"_matching": {
"ariaRegion": "Matching. Select from lists and then submit.",
"ariaCorrectAnswer": "The correct answer for {{{itemText}}} is {{{correctAnswer}}}",
"ariaUserAnswer": "The answer you chose for {{{itemText}}} was {{{userAnswer}}}"
},
"_mcq": {
"ariaRegion": "Multiple choice question",
"ariaCorrectAnswer": "The correct answer is {{{correctAnswer}}}",
"ariaCorrectAnswers": "The correct answers are {{{correctAnswer}}}",
"ariaUserAnswer": "The answer you chose was {{{userAnswer}}}",
"ariaUserAnswers": "The answers you chose were {{{userAnswer}}}"
},
"_media": {
"ariaRegion": "Media player{{#any _transcript._inlineTranscript _transcript._externalTranscript}} and transcript{{/any}}.",
"skipToTranscript": "Skip to transcript",
"playText": "Play",
"pauseText": "Pause",
"stopText": "Stop",
"audioPlayerText": "Audio Player",
"videoPlayerText": "Video Player",
"tracksText": "Captions/Subtitles",
"timeSliderText": "Time Slider",
"muteText": "Mute Toggle",
"unmuteStatusText": "Unmute",
"muteStatusText": "Mute",
"volumeSliderText": "Volume Slider",
"fullscreenText": "Fullscreen",
"goFullscreenText": "Go Fullscreen",
"turnOffFullscreenText": "Turn off Fullscreen",
"noneText": "None",
"skipBackText": "Skip back %1 seconds",
"allyVolumeControlText": "Use Up/Down Arrow keys to increase or decrease volume.",
"progessHelpText": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds."
},
"_narrative": {
"ariaRegion": "Slide show. Select the next button to progress.",
"previous": "{{#if title}}Back to {{{title}}} (item {{itemNumber}} of {{totalItems}}){{else}}{{_globals._accessibility._ariaLabels.previous}}{{/if}}",
"next": "{{#if title}}Forward to {{{title}}} (item {{itemNumber}} of {{totalItems}}){{else}}{{_globals._accessibility._ariaLabels.next}}{{/if}}"
},
"_slider": {
"ariaRegion": "Slider. Respond to the question by selecting a value on the scale and then submit.",
"ariaCorrectAnswer": "The correct answer is {{{correctAnswer}}}",
"ariaCorrectAnswerRange": "The correct answer is any value from {{{bottom}}} to {{{top}}}",
"ariaUserAnswer": "The answer you chose was {{{userAnswer}}}",
"labelStart": "Start of the scale",
"labelEnd": "End of the scale"
},
"_text": {
"ariaRegion": ""
},
"_textinput": {
"ariaRegion": "Text input. Type your answer and then submit."
}
},
"_menu": {
"_boxMenu": {
"durationLabel": "Duration:"
}
}
},
"_latestTrackingId": 19,
"_pageLevelProgress": {
"_isEnabled": true,
"_showPageCompletion": false,
"_isCompletionIndicatorEnabled": false,
"_isShownInNavigationBar": true
},
"_resources": {
"_isEnabled": true,
"title": "Resources",
"description": "View resources for this course by clicking here.",
"_filterButtons": {
"all": "All",
"document": "Document",
"media": "Media",
"link": "Link"
},
"_filterAria": {
"allAria": "View all resources",
"documentAria": "View document resources",
"mediaAria": "View media resources",
"linkAria": "View resource links"
},
"_resourcesItems": [
{
"_type": "document",
"title": "Vanilla Theme Swatch",
"description": "See the swatch for the vanilla theme by clicking here.",
"_link": "course/en/images/vanilla-swatch.jpg"
},
{
"_type": "media",
"title": "Adapt Learning YouTube Channel",
"description": "Fancy catching up on some Adapt material? Click here.",
"_link": "https://www.youtube.com/channel/UCW8SlSFuCc--B66Gf9fAEcQ"
},
{
"_type": "link",
"title": "Adapt Project Site",
"description": "View the project's web site by clicking here.",
"_link": "https://www.adaptlearning.org/"
},
{
"_type": "link",
"title": "Framework chat",
"description": "Join the framework chat room by clicking here.",
"_link": "https://gitter.im/adaptlearning/adapt_framework"
}
]
},
"_start": {
"_isEnabled": false,
"_startIds": [
{
"_id": "co-05",
"_skipIfComplete": true,
"_className": ""
}
],
"_force": false,
"_isMenuDisabled": false
},
"_assessment": {
"_isPercentageBased": true,
"_scoreToPass": 75,
"_correctToPass": 75
},
"_bookmarking": {
"_isEnabled": true,
"_level": "component",
"title": "Resume?",
"body": "Would you like to resume the course from the location you were at last time?",
"_buttons": {
"yes": "Yes",
"no": "No"
}
}
}
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Loading