Skip to content
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

feat: Display webview for exam if it has audio questions or IELTS exam #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Karthik-0
Copy link
Contributor

@Karthik-0 Karthik-0 commented Jul 27, 2022

  • If user clicks an exam, we will fetch that exam data from content detail API so that we can get has_audio_questions field.
  • If exam is either IELTS template or has_audio_questions then we will display webview

@Karthik-0 Karthik-0 self-assigned this Jul 27, 2022
@@ -112,6 +112,9 @@ class ContentDetailPageViewController: UIViewController, UIPageViewControllerDel
loadContent()
} else {
setFirstViewController()
if (contents[getCurrentIndex()].examId != -1) {
Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract

Comment on lines +192 to +199
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract

Comment on lines +201 to +212
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants