I'm developing a project using pybossa. I want to implement the skip button in that way that the question is skipped but nothing is saved to the database:
Right now when I implemented a button which records an answer on the database in order to move on with the next question:
// skip button click event. 'for skip data storage'
function skipButtonClick(deferred, task){
var answer = {
"result": "skipped",
"index": task.info.index
};
pybossa.saveTask(task.id, answer).done(function(data){
window.location.href = "/project/test/newtask";
}).fail(function(){
onRequestError()
}); ;
}
Here is the html code:
//skip task
$('.skip').off("click").on("click", function(){
skipButtonClick(deferred, task);
});
How can I skip a task is pybossa without saving anything? Is this posible? Please help me!
Here one of the core developers of PYBOSSA. We do not have a "way" to skip a PYBOSSA task. Why? Because we want to analyze everything with statistical tools. Therefore, we've designed PYBOSSA to take those skip actions as something that we will save in order to analyze the tasks from every single point of view.
Usually, when people skip a task, it is because it's too difficult, it has something wrong, or there's something special with it. If you allow people to skip it without registering this action, you will be missing those special tasks when doing the analysis. Therefore, we wanted to surface even those tasks when doing the analysis.
From the UX point of view, the user will skip the task and it will feel like they're actually skipping it, so this solution will work out.
While PYBOSSA is not designed to skip tasks, you can do it yourself. PYBOSSA has a plugin system, and all you have to do is to implement a new scheduler that will take this into account. Check our Plugin info here: https://docs.pybossa.com/plugins/
And the source code of one example here: https://github.com/PyBossa/plugin-scheduler-template
All the best,
Daniel