Project

General

Profile

Bug #3324

Can't access orphaned questions from question pool

Added by Marko Kastelic over 8 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
26/04/2011
Due date:
% Done:

70%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

after removing question from the test, i can't get it back from the question pool (the question is present in the relevant database tables)


Related issues

Related to Chamilo LMS - Feature #4867: Delete button in questions poolNew10/06/2012

Actions

Associated revisions

Revision 0a85b066 (diff)
Added by Julio Montoya over 8 years ago

Adding fix sent by Marko Kastelic see #3324

Revision 1a2150eb (diff)
Added by Julio Montoya over 8 years ago

Fixing bread crumb, removing useless code see #3324

History

#1

Updated by Marko Kastelic over 8 years ago

can' work :
around line 460 :

$result=Database::query($sql);
//$nbrQuestions=Database::num_rows($result);
$nbrQuestions=count($main_question_list);

$main_question_list is not populated for $exerciseId == -1 (orphans)

#2

Updated by Marko Kastelic over 8 years ago

main/exercice/question_pool.php, add following code to line 388

$result=Database::query($sql);
        while($row = Database::fetch_array($result, 'ASSOC')) {
           $main_question_list[] = $row;
        }
#3

Updated by Marko Kastelic over 8 years ago

since exercise level is not set for default to any value [1..5], can i suggest to add level 0 to filter's possible values in line 293 of the same file ?

#4

Updated by Julio Montoya over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#5

Updated by Julio Montoya over 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % Done changed from 0 to 60
#6

Updated by Marko Kastelic over 8 years ago

and you can also remove query $result=Database::query($sql); (line 461) /not used anywhere/

note:
currently there is no entry to delete (purge) question from database. Question can be purged if it is not bind to any of the test (so it is orphane). Very clean solution would be, if the list of tools for the orphans (currently only reuse) is extendend with remove question from questions pool. Procedures for deleting are present: just remove &fromExercise parameter (by the way: after applying filter, parameter is doubled) after selecting orphans (code at lines 506/540)

edit:
from the questions pool page i cannot see which exercise is originated exercise (i enter from, but when entered for recycle, i cannot check if i enter from the wrong one)

#7

Updated by Julio Montoya over 8 years ago

  • % Done changed from 60 to 70

code removed + I fix the bread crumb now you can see the current exercise
thanks for reporting!

http://code.google.com/p/chamilo/source/detail?r=0ff4eeac5786b04b34266e8a74f3268a7c680d8a&repo=classic

#8

Updated by Julio Montoya over 8 years ago

  • Target version set to 1.8.8 stable
#9

Updated by Julio Montoya over 8 years ago

  • Target version changed from 1.8.8 stable to 1.9 Stable

There is the "delete button" missing in the question pool that could be implemented moving to 1.8.9

#10

Updated by Yannick Warnier over 7 years ago

  • Target version changed from 1.9 Stable to 1.9 Beta
#11

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Bug resolved
  • Assignee set to Julio Montoya

Closing. Adding little feature request in #4867

Also available in: Atom PDF