-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
156 additions
and
52 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
app/src/main/java/org/stepic/droid/analytic/experiments/VideoSplitTest.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.stepic.droid.analytic.experiments | ||
|
||
import org.stepic.droid.analytic.Analytic | ||
import org.stepic.droid.preferences.SharedPreferenceHelper | ||
import javax.inject.Inject | ||
|
||
class VideoSplitTest | ||
@Inject | ||
constructor( | ||
analytics: Analytic, | ||
sharedPreferenceHelper: SharedPreferenceHelper | ||
) : SplitTest<VideoSplitTest.Group>( | ||
analytics, | ||
sharedPreferenceHelper, | ||
|
||
name = "video_in_course_description", | ||
groups = Group.values() | ||
) { | ||
enum class Group( | ||
val isVideoEnabled: Boolean, | ||
override val distribution: Int | ||
) : SplitTest.Group { | ||
Control(isVideoEnabled = true, distribution = 3), | ||
NoVideo(isVideoEnabled = false, distribution = 1) | ||
} | ||
} |
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
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
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
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/org/stepic/droid/web/model/desk/DeskCustomFields.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.stepic.droid.web.model.desk | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
class DeskCustomFields( | ||
@SerializedName("360015393634") | ||
val technicalDetails: String, | ||
@SerializedName("360015393334") | ||
val link: String | ||
) |
13 changes: 12 additions & 1 deletion
13
app/src/main/java/org/stepic/droid/web/model/desk/DeskRequest.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
package org.stepic.droid.web.model.desk | ||
|
||
class DeskRequest(val requester: DeskRequester, val subject: String, val comment: DeskComment) | ||
import com.google.gson.annotations.SerializedName | ||
|
||
class DeskRequest( | ||
@SerializedName("requester") | ||
val requester: DeskRequester, | ||
@SerializedName("subject") | ||
val subject: String, | ||
@SerializedName("comment") | ||
val comment: DeskComment, | ||
@SerializedName("custom_fields") | ||
val customFields: DeskCustomFields | ||
) |
27 changes: 25 additions & 2 deletions
27
app/src/main/java/org/stepic/droid/web/model/desk/DeskRequestWrapper.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
package org.stepic.droid.web.model.desk | ||
|
||
class DeskRequestWrapper(val request: DeskRequest) { | ||
constructor(name: String, email: String, subject: String, comment: String) : this(DeskRequest(DeskRequester(name, email), subject, DeskComment(comment))) | ||
import com.google.gson.annotations.SerializedName | ||
|
||
class DeskRequestWrapper( | ||
@SerializedName("request") | ||
val request: DeskRequest | ||
) { | ||
constructor( | ||
name: String, | ||
email: String, | ||
subject: String, | ||
comment: String, | ||
|
||
link: String, | ||
technicalDetails: String | ||
) : this( | ||
request = DeskRequest( | ||
requester = DeskRequester(name, email), | ||
subject = subject, | ||
comment = DeskComment(comment), | ||
customFields = DeskCustomFields( | ||
link = link, | ||
technicalDetails = technicalDetails | ||
) | ||
) | ||
) | ||
} |
9 changes: 8 additions & 1 deletion
9
app/src/main/java/org/stepic/droid/web/model/desk/DeskRequester.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
package org.stepic.droid.web.model.desk | ||
|
||
class DeskRequester(val name: String, val email: String) | ||
import com.google.gson.annotations.SerializedName | ||
|
||
class DeskRequester( | ||
@SerializedName("name") | ||
val name: String, | ||
@SerializedName("email") | ||
val email: String | ||
) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ext.versions = [ | ||
code : 2018, | ||
name : '1.79', | ||
code : 2019, | ||
name : '1.80', | ||
|
||
minSdk : 15, | ||
targetSdk : 26, | ||
|