This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cognito Stack | |
Parameters: | |
AuthName: | |
Type: String | |
Description: Unique Auth Name for Cognito Resources | |
Resources: | |
# Creates a role that allows Cognito to send SNS messages | |
SNSRole: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$class": "io.clause.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest", | |
"forceMajeure": false, | |
"agreedDelivery": "2017-10-07T16:38:01.412Z", | |
"goodsValue": 200, | |
"transactionId": "402c8f50-9e61-433e-a7c1-afe61c06ef00", | |
"timestamp": "2017-11-12T17:38:01.412Z" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "io.clause.latedelivery", | |
"forceMajeur": "except for Force Majeure cases, ", | |
"seller": "Seller", | |
"buyer": "Buyer", | |
"penaltyUnit": 2, | |
"penaltyPeriod": ["day"], | |
"penaltyPercentage": 0.105, | |
"fractional": { | |
"fractionalPeriod": "day", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Raw Data Points | |
- lesson | |
- entered classroom | |
- time spent in classroom | |
- video playback | |
- visited | |
- player clicks | |
- heat maps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VideoPresentation(None,None,None,None,None) | |
CaptureEvent(Some(b916794a-8f92-474f-8d0b-c178b382988b),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:06.410Z) | |
CaptureEvent(Some(d4fa045f-1a72-4cac-94d9-7550e90b6e37),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.contentUploadFinished,2015-08-01T21:27:06.575Z) | |
CaptureEvent(Some(4cf854e1-43a2-416b-be3d-9b93baad28f1),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:07.256Z) | |
CaptureEvent(Some(40badefc-5f23-47fa-bc3f-95cb632f1fb0),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.processingFinished,2015-08-01T21:27:29.910Z) | |
CaptureEvent(Some(004b811e-4f76-4fdb-9c56-0991443129e0),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:30.893Z) | |
VideoPresentation(None,None,None,None,None) | |
CaptureEvent(Some(777629a6-3f18-418e-8f5f-5621c460430c),3325d9a8-5748-450c-b017-1fb028d6ab0b,CaptureEvent.capturePublished,2015-08-01T15:31:38.643Z) | |
CaptureEvent(Some(d811e33c-8121-400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val users = Await.result(ComponentRegistry.institutionUserDao.tableScan, 100.seconds) | |
users map { user => | |
if (user.pubnubAuthKey.isEmpty) { | |
println(s"updating user ${user.id}") | |
val updated = user.withAuthKey(echo360.util.IdGenerator.createUuid) | |
Await.result(ComponentRegistry.institutionUserDao.update(updated), 10.seconds) | |
Thread.sleep(10) | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val decks = Await.result(ComponentRegistry.slideDeckDao.tableScan, 100.seconds) | |
val lpms = Await.result(ComponentRegistry.lessonPublishableMediaDao.tableScan, 100.seconds) | |
val lessonSlides = Await.result(ComponentRegistry.lessonSlideDao.tableScan, 100.seconds) | |
val slides = Await.result(ComponentRegistry.slideDao.tableScan, 100.seconds) | |
slides map { slide => | |
decks find (_.id == Some(slide.slideDeckId)) map { deck => | |
if (deck.publishableMediaId != slide.publishableMediaId) { | |
println("found broken slide: " + slide.id) | |
val updatedSlide = slide.copy(publishableMediaId = deck.publishableMediaId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package migrations | |
import global.{ComponentRegistry, DaoRegistry} | |
import com.amazonaws.services.dynamodbv2.model.AttributeValue | |
import java.net.URI | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
object SlideUriMigration extends DatabaseMigration with DaoRegistry { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val institution = Await.result(ComponentRegistry.institutionService.fetchById("8b5fc2a9-9055-46bc-9a83-1ff8c00b004a"), 10.seconds) | |
Await.result(ComponentRegistry.sectionEnrollmentService.enroll(institution, "74ee7c8f-f854-4b3e-8210-f13714e7110c", "14d3dca8-e277-415e-93f7-1601d6b9ec03", models.UserSectionRole.Instructor), 100.seconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val sections = Await.result(ComponentRegistry.sectionDao.tableScan, 100.seconds) | |
sections map { section => | |
val sectionId = section.getIdOrFail | |
val userSections = Await.result(ComponentRegistry.userSectionService.findInstructorsBySectionId(sectionId), 100.seconds) | |
val instructorIds = userSections.map( _.userId ).distinct | |
val allInstructors = Await.result(ComponentRegistry.institutionUserService.findByIds(instructorIds, section.institutionId), 100.seconds) | |
val instructors = allInstructors.filter(!_.isInactive) | |
instructors.find(_.getIdOrFail == section.instructorId) getOrElse { | |
println("--") | |
println("broken section") |
NewerOlder