We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f22e1b commit 376fe3fCopy full SHA for 376fe3f
examples/php/php-divergent_change-01_base/src/Controller/CourseStepsGetController.php
@@ -11,7 +11,9 @@ final class CourseStepsGetController
11
const VIDEO_DURATION_PAUSES_MULTIPLIER = 1.1;
12
const QUIZ_TIME_PER_QUESTION_MULTIPLIER = 0.5;
13
const STEP_TYPE_VIDEO = 'video';
14
- const STEP_TYPE_QUIZ = 'quiz';
+ const STEP_TYPE_QUIZ = 'quiz';
15
+ const VIDEO_POINTS_PER_MINUTE = 100;
16
+ const QUIZ_POINTS_PER_MINUTE = 10;
17
private Platform $platform;
18
19
public function __construct(Platform $platform)
@@ -52,11 +54,11 @@ public function get(string $courseId): string
52
54
}
53
55
56
if ($type === self::STEP_TYPE_VIDEO) {
- $points = $stepDurationInMinutes * 100;
57
+ $points = $stepDurationInMinutes * self::VIDEO_POINTS_PER_MINUTE;
58
59
60
if ($type === self::STEP_TYPE_QUIZ) {
- $points = $quizTotalQuestions * self::QUIZ_TIME_PER_QUESTION_MULTIPLIER * 10;
61
+ $points = $quizTotalQuestions * self::QUIZ_TIME_PER_QUESTION_MULTIPLIER * self::QUIZ_POINTS_PER_MINUTE;
62
63
64
$results .= json_encode(
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments