This file contains 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
const conversionValueKey: string = 'http://my.lobsterink.com/xapi/extension/conversion-value' | |
const verbFirstOccurenceKey: string = 'http://my.lobsterink.com/xapi/extension/verb-first-occurence' | |
export class UserWithConversionValue { | |
conversionValue: number | |
userSubject: string | |
} | |
export class UserWithConversions { | |
conversions: Statement[] |
This file contains 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
let subjectAssessmentMapping: any = { | |
1: 3, | |
2: 99 | |
} | |
export class MedalsSummary { | |
bronzeMedals: number | |
customMedals: number | |
goldMedals: number | |
silverMedals: number |
This file contains 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
let enrichedEventMatrix: EnrichedEventMatrix // Needs to be populated | |
function enrichUserEvent(eventInfo: EventInfo, enrichedEventMatrix: EnrichedEventMatrix): void { | |
let enrichedEventType: EnrichedEventType = enrichedEventMatrix[eventInfo.type] | |
if (!enrichedEventType) { return } | |
let dataFromApi: any = api.runQuery(enrichedEventType.enrichGraphQLQuery) // Need to parameterise this | |
let enrichedEvent: enrichedEvent = enrichedEventType.enrichMappingFunction(dataFromApi) | |
This file contains 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
/* | |
** Get published content | |
*/ | |
getPublishedAssessmentByAssessmentId(assessmentId: number, hallmark: boolean): PublishedAssessment { | |
let query: string = “SELECT TOP 1 * FROM a IN PublishedCourse.assessments WHERE a.assessment_Id = @assessmentId ORDER BY a.dateCreated" | |
return db[hallmark ? 'hallmark' : 'client'].query(query) | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
// Angular imports | |
import { isArray, isBlank, isDate, isNumber, isStringMap, isPresent, isString } from 'angular2/src/facade/lang' | |
export class GraphQLUtils { | |
static createMutation(data: Object, dataDefinition: Object, method: string, mutationName?: string): string { | |
if (!method || !data) { return null } | |
let mutation: string = (mutationName || method) + '{' + method | |
mutation += '(' + GraphQLUtils.flattenObject(data) + ')' |
This file contains 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
import {ComponentFixture, describe, expect, inject, it, TestComponentBuilder} from 'angular2/testing' | |
import {Component, View} from 'angular2/src/core/metadata' | |
@Component({ selector: 'basic-component' }) | |
@View({ template: '<div></div>' }) | |
class BasicComponent { } | |
// Set up the browser adapter | |
import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter' | |
BrowserDomAdapter.makeCurrent() |
This file contains 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
import {ComponentFixture, describe, expect, inject, it, TestComponentBuilder} from 'angular2/testing' | |
import {Component, View} from 'angular2/src/core/metadata' | |
@Component({ selector: 'basic-component' }) | |
@View({ template: '<div></div>' }) | |
class BasicComponent { } | |
// Set up the browser adapter | |
import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter' | |
BrowserDomAdapter.makeCurrent() |