added search intervention. search opens new tab with search in the java course (at least in chrome)
send only 3 interventions per exercise at maximum
This commit is contained in:
@@ -618,7 +618,7 @@ configureEditors: function () {
|
||||
}, timeUntilBreak);
|
||||
|
||||
setTimeout(function() {
|
||||
$('#intervention-text').text(`Willst du eine Frage stellen?`);
|
||||
$('#intervention-text').html("Möchtest du eine Frage stellen?");
|
||||
$('#intervention-modal').modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
@@ -632,6 +632,13 @@ configureEditors: function () {
|
||||
});
|
||||
},
|
||||
|
||||
initializeSearchButton: function(){
|
||||
$('.btn-search').button().click(function(){
|
||||
var search = $('#search_search').val();
|
||||
window.open(`https://open.hpi.de/courses/javaeinstieg2017/pinboard?query=${search}`, '_blank', 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes');
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
initializeEverything: function() {
|
||||
this.initializeRegexes();
|
||||
@@ -648,6 +655,7 @@ configureEditors: function () {
|
||||
this.initializeTooltips();
|
||||
if ($('#editor').data('show-interventions') == true){
|
||||
this.initializeInterventionTimer();
|
||||
this.initializeSearchButton();
|
||||
}
|
||||
this.initPrompt();
|
||||
this.renderScore();
|
||||
|
Reference in New Issue
Block a user