2
2

The way I'm using OSQA is more as a feedback tool, there won't be a concept of an answer having been accepted.

Can anybody suggest how I'd modify OSQA to suit this?

Thank you

asked 06 Jul '10, 06:57

Martin's gravatar image

Martin
1562510
accept rate: 33%

edited 14 Feb '11, 10:13

rickross's gravatar image

rickross ♦♦
12.5k2914972


There is no option to achieve that, but you can alter the file forum/skins/default/question.html and around line 139 remove the accept button tag, and that should do the trick.

link

answered 06 Jul '10, 07:06

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

OK, thank you.

The other thing I want to do is change the behaviour of the "unanswered" tab to show questions that actually have no answers at all..

I've found the filter:

@decorators.render('questions.html', 'unanswered', ('unanswered'), weight=400) def unanswered(request): return question_list(request, Question.objects.filter(extra_ref=None), ('open questions without an accepted answer'), request.utils.set_sort_method('active'), None, _("Unanswered Questions"))

And I sort of understand it, but I don't understand where the filters are defined or how I'd make my own. Is there already a filter for questions with 0 answers? If not, can you give a hint as to where I'd edit to create one?

Thanks again!

(06 Jul '10, 07:18) Martin
1

Its possible, but my internet provider decided to take the day off, so I'm using my phone, and it will take me forever to type a propper answervto that in here. But as soon as my connection gets back I'll explain you how.

(06 Jul '10, 07:29) Hernani Cerq... ♦♦
1

Try this, where you see:

Question.objects.filter(extra_ref=None)

Replace with:

Question.objects.annotate(nanswers=Count('children')).filter(nanswers=0)
(07 Jul '10, 07:24) Hernani Cerq... ♦♦
1

Ah, and dont forget to import the Count class:

from django.db.models import Count
(07 Jul '10, 07:25) Hernani Cerq... ♦♦

Worked perfectly, thank you!

(07 Jul '10, 08:09) Martin

I am really interested in this feature too (no way to accept an answer). I would love to see this as a setting.

The other thing is you need to disable the badges that have to do with accepted answers. But how can you disable badges in an existing install? I ask that question here: http://meta.osqa.net/questions/3442/disable-badges-in-an-existing-install

(07 Jul '10, 11:31) Joseph

@Martin, I made this JIRA, please vote on it: http://jira.osqa.net/browse/OSQA-394

(07 Jul '10, 11:33) Joseph

It appears that there is now an admin setting for this?

(31 Jul '10, 19:01) Joseph
showing 5 of 8 show 3 more comments

Sorry for "bumping" this old question but after doing this change, when i click the unanswered tab it doesnt work, it is loading until i have to kill apache and restart again.

link

answered 14 Feb '11, 08:28

miguidotcom's gravatar image

miguidotcom
1812811
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9

Asked: 06 Jul '10, 06:57

Seen: 673 times

Last updated: 14 Feb '11, 10:33

powered by OSQA