-
Couldn't load subscription status.
- Fork 0
feat: Display webview for exam if it has audio questions or IELTS exam #76
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
base: master
Are you sure you want to change the base?
Conversation
| loadContent() | ||
| } else { | ||
| setFirstViewController() | ||
| if (contents[getCurrentIndex()].examId != -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not explaining intent
| viewController.courseContent = content | ||
| viewController.contentAttempt = contentAttempt | ||
| present(slideMenuController, animated: true, completion: nil) | ||
| if exam.hasAudioQuestions || exam.templateType == 12 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract
| let viewController = WebViewController() | ||
| viewController.url = "&next=\(self.content.examStartUrl)/" | ||
| viewController.useSSOLogin = true | ||
| viewController.shouldOpenLinksWithinWebview = true | ||
| viewController.title = exam.title | ||
| viewController.displayNavbar = true | ||
| viewController.showBackButton = true | ||
| present(viewController, animated: true, completion: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract
| let storyboard = UIStoryboard(name: Constants.TEST_ENGINE, bundle: nil) | ||
| let slideMenuController = storyboard.instantiateViewController(withIdentifier: | ||
| Constants.TEST_ENGINE_NAVIGATION_CONTROLLER) as! UINavigationController | ||
|
|
||
| let viewController = | ||
| slideMenuController.viewControllers.first as! TestEngineSlidingViewController | ||
|
|
||
| viewController.exam = exam | ||
| viewController.attempt = attempt | ||
| viewController.courseContent = content | ||
| viewController.contentAttempt = contentAttempt | ||
| present(viewController, animated: true, completion: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract
has_audio_questionsfield.