Permalink
Browse files

setup framework for practice test

  • Loading branch information...
1 parent acea52a commit d37a252c119e841c4cffbcce37cab5427f858ad1 @crpietschmann committed Mar 25, 2016
View
22 LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Chris Pietschmann (http://pietschsoft.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
View
@@ -1 +1,11 @@
-# Azure-70-533-Practice-Test +# Azure 70-534 Certification Practice Test
+
+Test your knowledge of Azure with this collection of practice test questions for the Microsoft Azure [70-534](https://www.microsoft.com/learning/en-us/exam-70-534.aspx) Certification - Architecting Microsoft Azure Solutions.
+
+The [jsQuizEngine](http://www.oddjack.com/?certs=crpietschmannhttps://github.com/jsQuizEngine) file format is used for the practice questions so they can be taken like an actaul quiz/test with scoring.
+
+Even though things are still in the process of being put together for this practice test, you can still take the questions that have been put together thus far at the following link:
+
+[http://crpietschmann.github.io/Azure-70-534-Practice-Test/](http://crpietschmann.github.io/Azure-70-534-Practice-Test/)
+
+FYI, this is not an exhaustive set of test questions, just some I put together to help me study for and pass the exam. These questions are based on documentations material and the exam objectives list; and are not based on the actual exam or gear towards "teaching the exam" in any way.
@@ -0,0 +1,45 @@
+body {
+ padding-top: 5em;
+}
+footer {
+ margin-top: 2em;
+}
+.question-pool {
+ margin-bottom: 1em;
+}
+.question-pool .question .text {
+ margin-bottom: 0.75em;
+}
+.question-pool .question label.answer {
+ display: block;
+ font-weight: normal;
+ margin: 0;
+ padding: 0.75em;
+ border-bottom: dashed 0.1em transparent;
+ border-top: dashed 0.1em transparent;
+}
+.question-pool .question label.answer > input {
+ display: inline-block;
+ float: left;
+ margin-right: 0.5em;
+}
+.question-pool .question label.answer > div {
+ display: inline-block;
+}
+.question-pool .question label.answer.nth-child(1) {
+ border-top: dashed 0.1em transparent;
+}
+.question-pool .question .answer[data-correct].highlight {
+ background-color: rgba(70, 197, 65, 0.35);
+ border-color: #008000;
+}
+.question-pool .question .answer:hover {
+ background-color: rgba(173, 216, 230, 0.1);
+}
+.question-pool .question .description {
+ display: none;
+}
+.score .pass-indicator h1 {
+ font-size: 10em;
+}
+/*# sourceMappingURL=jsQuizEngine.css.map */
View
@@ -0,0 +1,21 @@
+body {
+}
+
+.question-pool .question .description img {
+ width: 100%;
+}
+
+.social-nav .twitter-share-button {
+ margin-top: 1em;
+}
+
+#navbar.in .social-nav .twitter-share-button {
+ margin-left: 1em;
+}
+
+#jsQuizEngine > .quiz > h3, #jsQuizEngine > .score > h3 {
+ margin-top: 0;
+}
+#jsQuizEngine > .quiz > h5, #jsQuizEngine > .score > h5 {
+ margin-bottom: 0.25em;
+}
View
Binary file not shown.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,140 @@
+// jsQuizEngine http://www.oddjack.com/?certs=crpietschmannhttps://github.com/jsQuizEngine
+// Copyright (c) 2015 Chris Pietschmann http://pietschsoft.com
+// Licensed under MIT License http://www.oddjack.com/?certs=crpietschmannhttps://github.com/jsQuizEngine/blob/master/LICENSE
+(function (window, $) {
+
+ function getCurrentQuiz(container) {
+ return container.find('.question-pool > .quiz');
+ }
+ function getAllQuestions(container) {
+ return container.find('.question-pool > .quiz .question');
+ }
+ function getQuestionByIndex(container, index) {
+ return container.find('.question-pool > .quiz .question:nth-child(' + index + ')');
+ }
+ function getNowDateTimeStamp() {
+ var dt = new Date();
+ return dt.getMonth() + '/' + dt.getDate() + '/' + dt.getFullYear() + ' ' + dt.getHours() + ':' + (dt.getMinutes() >= 10 ? dt.getMinutes() : '0' + dt.getMinutes());
+ }
+
+ var ViewModel = function (elem, options) {
+ var self = this;
+ self.element = $(elem);
+ self.options = $.extend({}, engine.defaultOptions, options);
+
+ self.element.find('.question-pool').load(self.options.quizUrl, function () {
+ // quiz loaded into browser from HTML file
+
+ getCurrentQuiz(self.element).find('.answer').each(function (e, i) {
+ var elem = $(this),
+ newAnswer = $('<label></label>').addClass('answer').append('<input type=\'checkbox\'/>').append($('<div></div>').html(elem.html()));
+ if (elem.is('[data-correct]')) {
+ newAnswer.attr('data-correct', '1');
+ }
+ elem.replaceWith(newAnswer);
+ });
+
+ self.questionCount(getAllQuestions(self.element).length);
+ self.quizTitle(getCurrentQuiz(self.element).attr('data-title'));
+ self.quizSubTitle(getCurrentQuiz(self.element).attr('data-subtitle'));
+ });
+
+ self.quizStarted = ko.observable(false);
+ self.quizComplete = ko.observable(false);
+
+ self.quizTitle = ko.observable('');
+ self.quizSubTitle = ko.observable('');
+ self.questionCount = ko.observable(0);
+
+ self.currentQuestionIndex = ko.observable(0);
+ self.currentQuestionIndex.subscribe(function (newValue) {
+ if (newValue < 1) {
+ self.currentQuestionIndex(1);
+ } else if(newValue > self.questionCount()) {
+ self.currentQuestionIndex(self.questionCount());
+ } else {
+ getAllQuestions(self.element).hide()
+ getQuestionByIndex(self.element, newValue).show();
+ }
+
+ if (self.questionCount() !== 0) {
+ self.currentProgress(self.currentQuestionIndex() / self.questionCount() * 100);
+ }
+ });
+ self.currentProgress = ko.observable(0);
+
+ self.currentQuestionIsFirst = ko.computed(function () {
+ return self.currentQuestionIndex() === 1;
+ });
+ self.currentQuestionIsLast = ko.computed(function () {
+ return self.currentQuestionIndex() === self.questionCount();
+ });
+
+ self.startQuiz = function () {
+ // reset quiz to start state
+ self.currentQuestionIndex(0);
+ self.currentQuestionIndex(1);
+
+ self.quizStarted(true);
+ }
+
+ self.moveNextQuestion = function () {
+ self.currentQuestionIndex(self.currentQuestionIndex() + 1);
+ };
+ self.movePreviousQuestion = function () {
+ self.currentQuestionIndex(self.currentQuestionIndex() - 1);
+ };
+ self.showCurrentQuestionAnswer = function () {
+ var q = getQuestionByIndex(self.element, self.currentQuestionIndex());
+ q.find('.answer[data-correct]').addClass('highlight');
+ q.find('.description').slideDown();
+ };
+
+
+
+ self.calculateScore = function () {
+ var correctQuestions = [];
+ getAllQuestions(self.element).each(function (i, e) {
+ var q = $(this);
+ if (q.find('.answer').length === (
+ q.find('.answer[data-correct] > input[type=checkbox]:checked').length + q.find('.answer:not([data-correct]) > input[type=checkbox]:not(:checked)').length
+ )) {
+ correctQuestions.push(q);
+ }
+ });
+ self.totalQuestionsCorrect(correctQuestions.length);
+
+ if (self.questionCount() !== 0) {
+ self.calculatedScore(self.totalQuestionsCorrect() / self.questionCount() * 100);
+ }
+
+ self.calculatedScoreDate(getNowDateTimeStamp());
+
+ self.quizComplete(true);
+ };
+ self.totalQuestionsCorrect = ko.observable(0);
+ self.calculatedScore = ko.observable(0);
+ self.calculatedScoreDate = ko.observable('');
+ self.quizPassed = ko.computed(function () {
+ return self.calculatedScore() >= 50;
+ });
+ };
+
+
+ var engine = window.jsQuizEngine = function (elem, options) {
+ return new engine.fn.init(elem, options);
+ };
+ engine.defaultOptions = {
+ quizUrl: 'original.htm'
+ };
+ engine.fn = engine.prototype = {
+ version: 0.1,
+ init: function (elem, options) {
+ var vm = new ViewModel(elem[0], options);
+ ko.applyBindings(vm, elem[0]);
+ }
+ };
+ engine.fn.init.prototype = engine.fn;
+
+
+})(window, jQuery);
@@ -0,0 +1,13 @@
+<section class="quiz" data-title="Implement Web Apps" data-subtitle="Objective 1.1: Deploy Web Apps">
+ <section class="question">
+ <section class="text">
+ Question?
+ </section>
+ <section class="answer">wrong</section>
+ <section class="answer" data-correct>correct</section>
+ <section class="description">
+
+ </section>
+ </section>
+
+</section>

0 comments on commit d37a252

Please sign in to comment.