Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Apply Split Phase refactoring #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
rgomezcasas wants to merge 15 commits into main
base: main
Choose a base branch
Loading
from split-phase
Draft
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename
  • Loading branch information
rgomezcasas committed Apr 14, 2021
commit 376fe3ff281040fe1704736a1cfabd050d08af1e
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ final class CourseStepsGetController
const VIDEO_DURATION_PAUSES_MULTIPLIER = 1.1;
const QUIZ_TIME_PER_QUESTION_MULTIPLIER = 0.5;
const STEP_TYPE_VIDEO = 'video';
const STEP_TYPE_QUIZ = 'quiz';
const STEP_TYPE_QUIZ = 'quiz';
const VIDEO_POINTS_PER_MINUTE = 100;
const QUIZ_POINTS_PER_MINUTE = 10;
private Platform $platform;

public function __construct(Platform $platform)
Expand Down Expand Up @@ -52,11 +54,11 @@ public function get(string $courseId): string
}

if ($type === self::STEP_TYPE_VIDEO) {
$points = $stepDurationInMinutes * 100;
$points = $stepDurationInMinutes * self::VIDEO_POINTS_PER_MINUTE;
}

if ($type === self::STEP_TYPE_QUIZ) {
$points = $quizTotalQuestions * self::QUIZ_TIME_PER_QUESTION_MULTIPLIER * 10;
$points = $quizTotalQuestions * self::QUIZ_TIME_PER_QUESTION_MULTIPLIER * self::QUIZ_POINTS_PER_MINUTE;
}

$results .= json_encode(
Expand Down

AltStyle によって変換されたページ (->オリジナル) /