First time here? Check out the FAQ!

Can an admin mark question as answered?

We have a lot of new users who are not familiar with askbot and are not marking the questions as answered is there a way for an admin to mark a question as answered.

Evgeny's avatar
updated 2011-02-18 15:10:30 -0500
mwise's avatar
asked 2011-02-17 22:31:06 -0500
edit flag offensive 0 remove flag close merge delete


any idea where in the code I should start looking to enable this feature.. basically I need to change the js to allow the icon to be shown when the admin is looking at a question
mwise's avatar mwise (2011-02-18 22:55:01 -0500) edit
add a comment see more comments

2 Answers


Hello, to get it done quickly - please change these two things:

(1) - function askbot.models.user_assert_can_unaccept_best_answer in the file askbot/models/ - this assertion is used for both accepting and unaccepting the best answer.

(2) - show icon "accept answer" to admins - around line 207 in askbot/skins/default/templates/question.html by changing it from

{% if request.user == %}
       <img id="answer-img-accept-{{ }} ...


{% if request.user == or request.user.is_administrator() %}
       <img id="answer-img-accept-{{ }} ...

Properly it would require adding a couple of settings to the configuration and updating test cases and fix the rep awarding.

Edit: one more thing -

change file askbot/skins/default/media/js/post.js around line 288

var bindEvents = function(){
        // accept answers
        if(true){//edit on this line: was questionAuthorId == currentUserId){
            var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']';
Evgeny's avatar
updated 2011-02-19 19:42:07 -0500, answered 2011-02-19 03:13:07 -0500
edit flag offensive 0 remove flag delete link


that's a partial fix... the icon shows up and I made the edit to but when I click on the accept icon nothing happens.. is there something I'm missing..
mwise's avatar mwise (2011-02-19 18:50:19 -0500) edit
You are right, added another small change, seems to work then.
Evgeny's avatar Evgeny (2011-02-19 19:43:20 -0500) edit
thanks everything is now working :)
mwise's avatar mwise (2011-02-19 20:14:20 -0500) edit
add a comment see more comments

have these changes been made also to the Askbot latest release

viisik's avatar
answered 2011-02-20 13:40:09 -0500
edit flag offensive 0 remove flag delete link


Not yet, need to write test cases, the changes in my quick answers are just hacks that may be unreliable and have side effects.
Evgeny's avatar Evgeny (2011-02-20 13:58:13 -0500) edit
What is the status on this now?
mether's avatar mether (2011-07-10 02:21:26 -0500) edit
add a comment see more comments