How to get the total solved & unsolved questions?

3.89K viewsGeneral
1

I want to make a chart in the sidebar with the percentages of solved & unsolved questions.

There’s a way (or a function) to get the total ammount of solved & unsolved questions?

Thanks.

0

For total solved questions

ap_total_solved_questions(); // solved questions.

for unsolved question you have to add this function:

https://gist.github.com/rahularyan/179ba38b28686e297b1f

How I must call ap_total_unsolved_questions?

If I write the result is a large number that is not the unsolved questions.

The first one works perfectly. Thanks.

Edit:

I made this, and it’s works, what do you think, is a goog way to do it?

$total= ap_total_published_questions();
$solved = ap_total_solved_questions();
$notSolved = $total – $solved;

Yes, this will work too.