C# 클래스 Ru.GameSchool.BusinessLayer.Services.LevelService

Service class that abstracts the interraction around the level entity with the data layer.
상속: BaseService
파일 보기 프로젝트 열기: davidein/Ru.GameSchool 1 사용 예제들

공개 메소드들

메소드 설명
AddLevelProjectToCourseAndLevel ( LevelProject levelproject, int courseId ) : void

Adds a levelproject instance to a level

AnswerLevelExamQuestion ( int answerId, int userInfoId ) : void

Creates a user answer for a specific exam question.

CreateLevel ( Level level ) : void

Persist a level instance object to the datasource.

CreateLevelExam ( LevelExam levelExam ) : void

Persist a levelexam instance object to the datasource.

CreateLevelExamAnswer ( LevelExamAnswer levelExamAnswer ) : void

Creates a LevelExamAnswer

CreateLevelExamQuestion ( LevelExamQuestion levelExamQuestion ) : void

Creates a level exam question.

CreateLevelMaterial ( LevelMaterial levelMaterial, int courseId ) : void

Create level material item

CreateLevelProject ( LevelProject levelProject ) : void

Creates a levelproject instance

CreateLevelProjectResult ( LevelProjectResult levelProjectResult ) : void

checks if level

CreateUserLevelProjectResult ( LevelProjectResult levelProjectResult, UserInfo user ) : void

DeleteLevelExamAnswer ( int levelExamAnswerId ) : void

Deletes a level exam answer.

DeleteLevelExamQuestion ( int levelExamQuestionId ) : void

Deletes a level exam question. Also deletes all children answers.

DeleteLevelProject ( int levelProjectId ) : bool

checks if can delete

GetContentTypes ( ) : IEnumerable

Get level material content types

GetFirstQuestionByExamId ( int levelExamId ) : LevelExamQuestion

Gets the first question for a given exam.

GetLevel ( int levelId ) : Level

Gets a instance of Level from the datasource.

GetLevelExam ( int levelExamId ) : LevelExam

Get a level exam by LevelExamId.

GetLevelExamAnswer ( int levelExamAnswerId ) : LevelExamAnswer

Gets a level exam answer.

GetLevelExamQuestion ( int levelExamQuestionsId ) : LevelExamQuestion

Gets a level exam question.

GetLevelExamQuestionPlacement ( int levelExamQuestionId ) : int

Get the placement of the question in the level exam question list.

GetLevelExamsByCourseId ( int courseId, int userInfoId ) : IEnumerable

Gets a level exam by CourseId and UserInfoId.

GetLevelExamsByLevelId ( int levelId, int userInfoId ) : IEnumerable

Gets a level exam by LevelId and UserInfoId.

GetLevelMaterial ( int levelMaterialId ) : LevelMaterial

Get single level material with specific id

GetLevelMaterials ( ) : IEnumerable

Gets level materials

GetLevelMaterials ( int levelId ) : IEnumerable

Get level materials for a specified level

GetLevelMaterials ( int levelId, int contentTypeId ) : IEnumerable

Get level materials of a certain contenttype for a specified level

GetLevelProject ( int levelProjectId ) : LevelProject

Return a instance of levelproject by levelproject id

GetLevelProjectResultsByUserId ( int userInfoId ) : IEnumerable

Get a collection of levelprojectresult instances by userinfoid

GetLevelProjects ( ) : IEnumerable

Returns all instances of levelprojects

GetLevelProjectsByCourseId ( int courseId ) : IEnumerable

Gets all levelproject objects by course id

GetLevelProjectsByCourseIdAndUserInfoId ( int userInfoId, int courseId ) : IEnumerable

returns a collection

GetLevelProjectsByLevelId ( int levelId ) : IEnumerable

Returns a collection of levelproject by levelid

GetLevelProjectsByUserId ( int userInfoId ) : IEnumerable

returns a collection

GetLevelTabsByCourseIdAndUserInfoId ( int courseId, int userInfoId ) : IEnumerable

Get leveltabs by course id and user info id

GetLevels ( ) : IEnumerable

Returns a collection of levels

GetLevels ( int courseId ) : IEnumerable

Returns a collection of level instances

GetLevelsByCourseId ( int courseId ) : IEnumerable

Returns all level instances by course id

GetNextLevelExamQuestion ( int levelExamQuestionId ) : LevelExamQuestion

Gets the next question in a level exam.

GetUserQuestionAnswer ( int levelExamQuestionId, int userInfoId ) : int

Gets the users LevelExamAnswerId for an exam question.

GetlevelProjectResultByLevelProjectId ( int levelProjectId ) : LevelProjectResult

Returns a instance of levelprojectresult by levelproject id

GetlevelProjectResultsByLevelProjectId ( int levelProjectId ) : IEnumerable

GetlevelProjectResultsByLevelProjectResultId ( int id ) : LevelProjectResult

Returns a instance of levelprojectresult by levelprojectresultid

HasAccess ( int levelId, int userInfoId ) : bool

CHecks if a user has acces to a particular level

HasAccessToExam ( int levelExamId, int userInfoId ) : bool

Checks if the user has access to an exam.

ReturnExam ( int levelExamId, int userInfoId ) : double

Closes an exam and gives the user a grade, points and notification.

UpdateLevel ( Level level ) : void

Update a level object with new changes and persist it to the datasource.

UpdateLevelExam ( LevelExam levelExam ) : void

Updates a levelexam.

UpdateLevelMaterial ( LevelMaterial levelMaterial ) : void

Update level material item

UpdateLevelProject ( LevelProject levelProject ) : void

Updates a levelproject instance

UpdateLevelProjectFromResult ( LevelProject levelProject, int userInfoId ) : void

Updates a levelproject from levelrpojectresult

UpdateLevelProjectResult ( LevelProjectResult levelProjectResult ) : void

Updates a instance of levelproject

메소드 상세

AddLevelProjectToCourseAndLevel() 공개 메소드

Adds a levelproject instance to a level
public AddLevelProjectToCourseAndLevel ( LevelProject levelproject, int courseId ) : void
levelproject Ru.GameSchool.DataLayer.Repository.LevelProject
courseId int
리턴 void

AnswerLevelExamQuestion() 공개 메소드

Creates a user answer for a specific exam question.
public AnswerLevelExamQuestion ( int answerId, int userInfoId ) : void
answerId int Integer value of answer if
userInfoId int Integer value of userinfoid
리턴 void

CreateLevel() 공개 메소드

Persist a level instance object to the datasource.
public CreateLevel ( Level level ) : void
level Ru.GameSchool.DataLayer.Repository.Level Level instance to add.
리턴 void

CreateLevelExam() 공개 메소드

Persist a levelexam instance object to the datasource.
public CreateLevelExam ( LevelExam levelExam ) : void
levelExam Ru.GameSchool.DataLayer.Repository.LevelExam A levelexam persist.
리턴 void

CreateLevelExamAnswer() 공개 메소드

Creates a LevelExamAnswer
public CreateLevelExamAnswer ( LevelExamAnswer levelExamAnswer ) : void
levelExamAnswer Ru.GameSchool.DataLayer.Repository.LevelExamAnswer Levelexamanswer instance
리턴 void

CreateLevelExamQuestion() 공개 메소드

Creates a level exam question.
public CreateLevelExamQuestion ( LevelExamQuestion levelExamQuestion ) : void
levelExamQuestion Ru.GameSchool.DataLayer.Repository.LevelExamQuestion Levelexamquestion object
리턴 void

CreateLevelMaterial() 공개 메소드

Create level material item
public CreateLevelMaterial ( LevelMaterial levelMaterial, int courseId ) : void
levelMaterial Ru.GameSchool.DataLayer.Repository.LevelMaterial levelmaterial object
courseId int Id of course
리턴 void

CreateLevelProject() 공개 메소드

Creates a levelproject instance
public CreateLevelProject ( LevelProject levelProject ) : void
levelProject Ru.GameSchool.DataLayer.Repository.LevelProject LEvelproject object
리턴 void

CreateLevelProjectResult() 공개 메소드

checks if level
public CreateLevelProjectResult ( LevelProjectResult levelProjectResult ) : void
levelProjectResult Ru.GameSchool.DataLayer.Repository.LevelProjectResult
리턴 void

CreateUserLevelProjectResult() 공개 메소드

public CreateUserLevelProjectResult ( LevelProjectResult levelProjectResult, UserInfo user ) : void
levelProjectResult Ru.GameSchool.DataLayer.Repository.LevelProjectResult
user Ru.GameSchool.DataLayer.Repository.UserInfo
리턴 void

DeleteLevelExamAnswer() 공개 메소드

Deletes a level exam answer.
public DeleteLevelExamAnswer ( int levelExamAnswerId ) : void
levelExamAnswerId int
리턴 void

DeleteLevelExamQuestion() 공개 메소드

Deletes a level exam question. Also deletes all children answers.
public DeleteLevelExamQuestion ( int levelExamQuestionId ) : void
levelExamQuestionId int
리턴 void

DeleteLevelProject() 공개 메소드

checks if can delete
public DeleteLevelProject ( int levelProjectId ) : bool
levelProjectId int
리턴 bool

GetContentTypes() 공개 메소드

Get level material content types
public GetContentTypes ( ) : IEnumerable
리턴 IEnumerable

GetFirstQuestionByExamId() 공개 메소드

Gets the first question for a given exam.
public GetFirstQuestionByExamId ( int levelExamId ) : LevelExamQuestion
levelExamId int
리턴 Ru.GameSchool.DataLayer.Repository.LevelExamQuestion

GetLevel() 공개 메소드

Gets a instance of Level from the datasource.
public GetLevel ( int levelId ) : Level
levelId int The id of a level object to get.
리턴 Ru.GameSchool.DataLayer.Repository.Level

GetLevelExam() 공개 메소드

Get a level exam by LevelExamId.
public GetLevelExam ( int levelExamId ) : LevelExam
levelExamId int
리턴 Ru.GameSchool.DataLayer.Repository.LevelExam

GetLevelExamAnswer() 공개 메소드

Gets a level exam answer.
public GetLevelExamAnswer ( int levelExamAnswerId ) : LevelExamAnswer
levelExamAnswerId int
리턴 Ru.GameSchool.DataLayer.Repository.LevelExamAnswer

GetLevelExamQuestion() 공개 메소드

Gets a level exam question.
public GetLevelExamQuestion ( int levelExamQuestionsId ) : LevelExamQuestion
levelExamQuestionsId int
리턴 Ru.GameSchool.DataLayer.Repository.LevelExamQuestion

GetLevelExamQuestionPlacement() 공개 메소드

Get the placement of the question in the level exam question list.
public GetLevelExamQuestionPlacement ( int levelExamQuestionId ) : int
levelExamQuestionId int
리턴 int

GetLevelExamsByCourseId() 공개 메소드

Gets a level exam by CourseId and UserInfoId.
public GetLevelExamsByCourseId ( int courseId, int userInfoId ) : IEnumerable
courseId int
userInfoId int
리턴 IEnumerable

GetLevelExamsByLevelId() 공개 메소드

Gets a level exam by LevelId and UserInfoId.
public GetLevelExamsByLevelId ( int levelId, int userInfoId ) : IEnumerable
levelId int
userInfoId int
리턴 IEnumerable

GetLevelMaterial() 공개 메소드

Get single level material with specific id
public GetLevelMaterial ( int levelMaterialId ) : LevelMaterial
levelMaterialId int Id of levelmaterial
리턴 Ru.GameSchool.DataLayer.Repository.LevelMaterial

GetLevelMaterials() 공개 메소드

Gets level materials
public GetLevelMaterials ( ) : IEnumerable
리턴 IEnumerable

GetLevelMaterials() 공개 메소드

Get level materials for a specified level
public GetLevelMaterials ( int levelId ) : IEnumerable
levelId int Id of level
리턴 IEnumerable

GetLevelMaterials() 공개 메소드

Get level materials of a certain contenttype for a specified level
public GetLevelMaterials ( int levelId, int contentTypeId ) : IEnumerable
levelId int Id of level
contentTypeId int Type of levelmaterial
리턴 IEnumerable

GetLevelProject() 공개 메소드

Return a instance of levelproject by levelproject id
public GetLevelProject ( int levelProjectId ) : LevelProject
levelProjectId int Id of a levelproject
리턴 Ru.GameSchool.DataLayer.Repository.LevelProject

GetLevelProjectResultsByUserId() 공개 메소드

Get a collection of levelprojectresult instances by userinfoid
public GetLevelProjectResultsByUserId ( int userInfoId ) : IEnumerable
userInfoId int Id of a userInfo instance.
리턴 IEnumerable

GetLevelProjects() 공개 메소드

Returns all instances of levelprojects
public GetLevelProjects ( ) : IEnumerable
리턴 IEnumerable

GetLevelProjectsByCourseId() 공개 메소드

Gets all levelproject objects by course id
public GetLevelProjectsByCourseId ( int courseId ) : IEnumerable
courseId int Id of a course to find levelproject objects
리턴 IEnumerable

GetLevelProjectsByCourseIdAndUserInfoId() 공개 메소드

returns a collection
public GetLevelProjectsByCourseIdAndUserInfoId ( int userInfoId, int courseId ) : IEnumerable
userInfoId int
courseId int
리턴 IEnumerable

GetLevelProjectsByLevelId() 공개 메소드

Returns a collection of levelproject by levelid
public GetLevelProjectsByLevelId ( int levelId ) : IEnumerable
levelId int Integer vased value of levelid to find
리턴 IEnumerable

GetLevelProjectsByUserId() 공개 메소드

returns a collection
public GetLevelProjectsByUserId ( int userInfoId ) : IEnumerable
userInfoId int
리턴 IEnumerable

GetLevelTabsByCourseIdAndUserInfoId() 공개 메소드

Get leveltabs by course id and user info id
public GetLevelTabsByCourseIdAndUserInfoId ( int courseId, int userInfoId ) : IEnumerable
courseId int Id of a course to find
userInfoId int Id of a userinfo to find
리턴 IEnumerable

GetLevels() 공개 메소드

Returns a collection of levels
public GetLevels ( ) : IEnumerable
리턴 IEnumerable

GetLevels() 공개 메소드

Returns a collection of level instances
public GetLevels ( int courseId ) : IEnumerable
courseId int
리턴 IEnumerable

GetLevelsByCourseId() 공개 메소드

Returns all level instances by course id
public GetLevelsByCourseId ( int courseId ) : IEnumerable
courseId int Id of course
리턴 IEnumerable

GetNextLevelExamQuestion() 공개 메소드

Gets the next question in a level exam.
public GetNextLevelExamQuestion ( int levelExamQuestionId ) : LevelExamQuestion
levelExamQuestionId int The current level exam question id.
리턴 Ru.GameSchool.DataLayer.Repository.LevelExamQuestion

GetUserQuestionAnswer() 공개 메소드

Gets the users LevelExamAnswerId for an exam question.
If the question does not exist.
public GetUserQuestionAnswer ( int levelExamQuestionId, int userInfoId ) : int
levelExamQuestionId int
userInfoId int
리턴 int

GetlevelProjectResultByLevelProjectId() 공개 메소드

Returns a instance of levelprojectresult by levelproject id
public GetlevelProjectResultByLevelProjectId ( int levelProjectId ) : LevelProjectResult
levelProjectId int
리턴 Ru.GameSchool.DataLayer.Repository.LevelProjectResult

GetlevelProjectResultsByLevelProjectId() 공개 메소드

public GetlevelProjectResultsByLevelProjectId ( int levelProjectId ) : IEnumerable
levelProjectId int
리턴 IEnumerable

GetlevelProjectResultsByLevelProjectResultId() 공개 메소드

Returns a instance of levelprojectresult by levelprojectresultid
public GetlevelProjectResultsByLevelProjectResultId ( int id ) : LevelProjectResult
id int Levelprojectresultid
리턴 Ru.GameSchool.DataLayer.Repository.LevelProjectResult

HasAccess() 공개 메소드

CHecks if a user has acces to a particular level
public HasAccess ( int levelId, int userInfoId ) : bool
levelId int Integer value of level
userInfoId int Integer value of userinfo
리턴 bool

HasAccessToExam() 공개 메소드

Checks if the user has access to an exam.
public HasAccessToExam ( int levelExamId, int userInfoId ) : bool
levelExamId int Id of a levelexam
userInfoId int
리턴 bool

ReturnExam() 공개 메소드

Closes an exam and gives the user a grade, points and notification.
public ReturnExam ( int levelExamId, int userInfoId ) : double
levelExamId int id of a levelexam
userInfoId int id of an userinfo
리턴 double

UpdateLevel() 공개 메소드

Update a level object with new changes and persist it to the datasource.
public UpdateLevel ( Level level ) : void
level Ru.GameSchool.DataLayer.Repository.Level Level instance with updated values.
리턴 void

UpdateLevelExam() 공개 메소드

Updates a levelexam.
public UpdateLevelExam ( LevelExam levelExam ) : void
levelExam Ru.GameSchool.DataLayer.Repository.LevelExam Levelexam instance to update.
리턴 void

UpdateLevelMaterial() 공개 메소드

Update level material item
public UpdateLevelMaterial ( LevelMaterial levelMaterial ) : void
levelMaterial Ru.GameSchool.DataLayer.Repository.LevelMaterial Levelmaterial object
리턴 void

UpdateLevelProject() 공개 메소드

Updates a levelproject instance
public UpdateLevelProject ( LevelProject levelProject ) : void
levelProject Ru.GameSchool.DataLayer.Repository.LevelProject Levelproject object
리턴 void

UpdateLevelProjectFromResult() 공개 메소드

Updates a levelproject from levelrpojectresult
public UpdateLevelProjectFromResult ( LevelProject levelProject, int userInfoId ) : void
levelProject Ru.GameSchool.DataLayer.Repository.LevelProject Integer value of levelproject
userInfoId int
리턴 void

UpdateLevelProjectResult() 공개 메소드

Updates a instance of levelproject
public UpdateLevelProjectResult ( LevelProjectResult levelProjectResult ) : void
levelProjectResult Ru.GameSchool.DataLayer.Repository.LevelProjectResult
리턴 void