-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Offline evaluation support #1434
base: master
Are you sure you want to change the base?
Conversation
@@ -5,7 +5,8 @@ ruby '~> 2.3' | |||
|
|||
gem 'puma' | |||
|
|||
gem 'mumuki-domain', github: 'mumuki/mumuki-domain' | |||
gem 'mumuki-domain', github: 'mumuki/mumuki-domain', branch: 'feature-cumparsita' |
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.
This line only adds offline tests. We should merge them instead
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.
Local evaluation
@@ -5,7 +5,8 @@ ruby '~> 2.3' | |||
|
|||
gem 'puma' | |||
|
|||
gem 'mumuki-domain', github: 'mumuki/mumuki-domain' | |||
gem 'mumuki-domain', github: 'mumuki/mumuki-domain', branch: 'feature-cumparsita' | |||
gem 'mulangjs', path: '../mulang/ghcjslib/gem' |
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 necessary in the first iteration
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.
Local evaluation
@@ -196,6 +196,8 @@ which are granted to be safe and stable. | |||
* `setUpDeleteFiles` | |||
* `setUpDeleteFile` | |||
* `updateButtonsVisibility` | |||
* `mumuki.registerLocalTestRunner` | |||
* `mumuki.registerLocalExpectationsRunner` |
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.
OK. Perhaps could be namespaced into mumuki.local
This steps may not always be necessary for local evaluation. They should be documented
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.
Local evaluation
@@ -204,9 +206,7 @@ which are granted to be safe and stable. | |||
{ | |||
"status": "failed", | |||
"guide_finished_by_solution": false, | |||
"class_for_progress_list_item":"progress-list-item text-center danger active", | |||
"html":"...", |
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.
Although this is not strictly necessary for a first iteration, it has a lot of sense
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.
Pre rendering
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.
Done here: #1435
//= require rails-ujs | ||
//= require turbolinks |
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.
Rollback
data: solution | ||
}); | ||
return $.ajax(request); | ||
} |
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.
Local evaluation + local progress + local sync
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.
Done in #1443
result.html = result.html || mumuki.renderCorollaryHtml(status, exercise); | ||
} catch (e) { | ||
console.log(`[Mumuki::Laboratory::Bridge] pre-rendering failed ${e}`); | ||
throw e; |
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.
Pre rendering
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.
Done in #1435
editor.getDoc().setValue(content); | ||
}); | ||
} | ||
|
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.
???
@@ -7,7 +7,7 @@ mumuki.load(function () { | |||
url: $(this).data('confirmation-url'), | |||
xhrFields: {withCredentials: true}, | |||
success: function(data){ | |||
mumuki.updateProgressBarAndShowModal(data); | |||
mumuki.updateCurrentExerciseProgressBarAndShowModal(data); |
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.
Rollback. Heavily backward incompatible
Laboratory.prototype = { | ||
|
||
(() => { | ||
class Laboratory { |
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.
Done #1443
mumuki.load(() => { | ||
// Set global currentExerciseId | ||
const $muExerciseId = $('#mu-exercise-id')[0]; | ||
const $muExerciseResource = $('#mu-exercise-resource')[0]; |
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.
Partially done in #1443
This draft is just a notebook, based on an old unmerged feature of offline suppport.
It contains comments and references to the actual PRs that merge this behaviour:
See: