anchor.diff:        validation:
         <pre>
           if not Rails.configuration.lti_settings[params[:oauth_consumer_key]]
  -          render :launch_error, status: 401
  -          return
  +        render :launch_error, status: 401
  +        return
           end </pre><br>
   
         The code above checks if the key is present in the settings
  
positive.code:         <%= image_tag "quiz_launch_error.png", style:'width:40%' %>
        </div>
  
        Your <strong>routes.rb</strong> file at the end should somewhat look like this for our Quiz application:<br><br>
        <pre>
          Rails.application.routes.draw do
            get 'quiz/index'
            resources :questions
            post 'questions/submitQuestion'=>'questions#submitQuestion', as: :submit_question
            root 'sessions#login'
            get "signup", :to => "users#new"
            get "login", :to => "sessions#login"
            get "logout", :to => "sessions#logout"
            get "home", :to => "sessions#home"
            get "profile", :to => "sessions#profile"
            get "setting", :to => "sessions#setting"
            post "signup", :to => "users#new"
            post "login", :to => "sessions#login"
            post "logout", :to => "sessions#logout"
            post "login_attempt", :to => "sessions#login_attempt"
            get "login_attempt", :to => "sessions#login_attempt"
            post "user_create", :to => "users#create"
            get "all", :to => "questions#index"
            get "result", :to => "questions#result"
            get 'lti/launch'
            post 'lti/launch'
            get 'lti/submitscore'
            post 'lti/submitscore'
          end
        </pre>
      </p><br>
  
      <p>
        At this point you have a working LTI enabled quiz application which will work as is for non LTI launches (on your own domain) and will also work as an LTI tool when launched from within a tool consumer. If it is launched from within a tool consumer, then once a user submits an assessment, his scores will be recorded in a gradebook. On Canvas it will look like this:
  
        <div class="text-center">
          <%= image_tag "quiz_result.png", style:'width:50%' %>
        </div><br><br>
        Here you can download the
        <a href="https://github.com/CSSPLICE/LTI/tree/master/Quiz-LTI">complete source code</a> for a version of the quiz application with LTI support.
      </p>
    </span>
  </div>
  
negative.code:           If the two signatures match, only then the request is valid.
          </li>
        </ol>
        Fortunately, the IMS-LTI gem will do both of these steps for us.
        It will validate the LTI request and will also perform OAuth
        authentication.
        Add the following code in the launch endpoint.
        The first part creates a Tool provider object with a key and a
  