Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nampnq/bower-videogular-quiz
Videogular `quiz` plugin repository for distribution on `bower`
https://github.com/nampnq/bower-videogular-quiz
Last synced: 2 months ago
JSON representation
Videogular `quiz` plugin repository for distribution on `bower`
- Host: GitHub
- URL: https://github.com/nampnq/bower-videogular-quiz
- Owner: NamPNQ
- License: mit
- Created: 2013-12-28T16:40:14.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-22T02:37:30.000Z (almost 10 years ago)
- Last Synced: 2024-10-10T01:12:17.111Z (3 months ago)
- Language: JavaScript
- Size: 126 KB
- Stars: 10
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bower-videogular-quiz (DISCONTINUE)
===================================Videogular `quiz` plugin repository for distribution on `bower`
![Quiz Plugin](http://help.coursera.org/customer/portal/attachments/153501)## Install
Install [Videogular](http://www.videogular.com/) `quiz` plugin with Bower:
`bower install videogular-quiz`
Inside the folder `bower_components\videogular-quiz` you should find also `html`, `css`partials that you should locate in `.\views\videogular\plugins\quiz\`.
## How to use
Add directives source to your HTML:```html
{{ currentTime }}
{{ totalTime }}
```
Add function callback and data config in main controller
```js
$scope.onQuizSubmit = function(data) {
return {
result:true,
description:"Correct"
}
}
$scope.config = {
width: 740,
...
plugins: {
poster: {
url: "assets/images/videogular.png"
},
quiz: {
data: [{
"time": "164",
"question_id": "70d70be689d73e08687496a6d12b2b0d",
"html": "Select the restaurant(s) that serve Canadian cuisine for a price of $$$.\n\n\n\nGeorgie Porgie\n87%\n$$$\nCanadian,Pub Food\n\nSilver Spoon\n97%\n$$$$\nCanadian\n\nCoffee Cafe\n77%\n$$\nCoffee/Tea,Diner\n\n\n\nGeorgie Porgie\n\n\nSilver Spoon\n\n\nCoffee Cafe\n",
"background": "color",
"background_src": "white",
"post_answer_url": "https:\/\/class.coursera.org\/programming2-001\/quiz\/video_quiz_attempt?method=post_question_answer&quiz_id=20&preview=0&question_id=70d70be689d73e08687496a6d12b2b0d"
}, {
"time": "180",
"question_id": "9326a7b17e15cfc69f8e46f9357bf6c5",
"html": "\n\n\ndef is_palindrome_v3(s):\n i = 0\n j = len(s) - 1\n while i < j and s[i] == s[j]:\n i = i + 1\n j = j - 1\n\n return j <= i\n\n\nIfs
refers to a single-character string such as 'x', when the return statement is reached, which of the following expressions evaluates toTrue
?\n\ni == 0 and j == -1
\n\n\ni == 0 and j == 0
\n\n\ni == 0 and j == 1
\n\n",i == 1 and j == 0
\n
"background": "color",
"background_src": "white",
"post_answer_url": "https:\/\/class.coursera.org\/programming2-001\/quiz\/video_quiz_attempt?method=post_question_answer&quiz_id=18&preview=0&question_id=9326a7b17e15cfc69f8e46f9357bf6c5"
}]
}
}
};
```Additionally, you will need to add quiz plugins and videogular to your application:
```js
"use strict";
angular.module("videogularApp",
[
"controllers","com.2fdevs.videogular",
"com.2fdevs.videogular.plugins.controlbar",
"com.2fdevs.videogular.plugins.overlayplay",
"com.2fdevs.videogular.plugins.buffering",
"info.vietnamcode.nampnq.videogular.plugins.quiz"
]
);
```And that's all :)
### Install Videogular
Install [Videogular](http://www.videogular.com/) with Bower:
`bower install videogular`
### Install themes
Install [Videogular](http://www.videogular.com/) themes with Bower:
`bower install videogular-themes-default`
### Install plugins
Install [Videogular](http://www.videogular.com/) plugins with Bower:
`bower install videogular-buffering`
`bower install videogular-controls`
`bower install videogular-poster`
## Documentation
It's available on [Videogular's project Wiki](https://github.com/2fdevs/videogular/wiki).
## License
The MIT License (MIT)
Copyright (c) 2013 NamPNQ
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.