-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
908 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the compilers controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the Debuggers controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.spinner { | ||
display: inline-block; | ||
width: 15px; | ||
height: 15px; | ||
position: relative; | ||
border: 2px solid rgba(0,0,0,0.5); | ||
border-top-color: transparent; | ||
border-radius: 100%; | ||
|
||
-webkit-animation: spin 1s infinite linear; | ||
-moz-animation: spin 1s infinite linear; | ||
-ms-animation: spin 1s infinite linear; | ||
-o-animation: spin 1s infinite linear; | ||
animation: spin 1s infinite linear; | ||
} | ||
|
||
.spinner:after { | ||
content: ''; | ||
display: block; | ||
width: 0; | ||
height: 0; | ||
position: absolute; | ||
top: -5px; | ||
left: 0px; | ||
|
||
border: 4px solid transparent; | ||
border-bottom-color: rgba(0,0,0,0.5); | ||
|
||
-webkit-transform: rotate(45deg); | ||
-moz-transform: rotate(45deg); | ||
-ms-transform: rotate(45deg); | ||
-o-transform: rotate(45deg); | ||
transform: rotate(45deg); | ||
} | ||
|
||
@-webkit-keyframes spin { | ||
to { -webkit-transform: rotate(360deg); } | ||
} | ||
|
||
@-moz-keyframes spin { | ||
to { -moz-transform: rotate(360deg); } | ||
} | ||
|
||
@-ms-keyframes spin { | ||
to { -ms-transform: rotate(360deg); } | ||
} | ||
|
||
@-o-keyframes spin { | ||
to { -o-transform: rotate(360deg); } | ||
} | ||
|
||
@keyframes spin { | ||
to { transform: rotate(360deg); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class CompilersController < ApplicationController | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class DebuggersController < ApplicationController | ||
|
||
# [Debugger: Debug - Story 3.6] | ||
# Send the recieved code to be debugged | ||
# and return the result to the user as a json object | ||
# Parameters: | ||
# id: The id of the problem being solved | ||
# code: The code to be debugged | ||
# case: Test case to be debugged against | ||
# Returns: Json object with the result of the debugging | ||
# Author: Mussab ElDash | ||
def start | ||
if lecturer_signed_in? || teaching_assistant_signed_in? | ||
render json: {} | ||
end | ||
id = current_student.id | ||
pid = params[:id] | ||
input = params[:code] | ||
cases = params[:case] | ||
result = Debugger.debug(id, pid, input, cases) | ||
p result | ||
render json: result | ||
end | ||
|
||
end |
Oops, something went wrong.