Error at Preview tab when editing a question

Error at Preview tab when editing a question

by Ângelo Rigo -
Number of replies: 6
Hi

In Moodle 1.9.3 when i click on edit icon at the preview tab
wich take to this link :

http://www.moodle.somedomain.com/question/question.php?id=232&cmid=120&returnurl=http%3A%2F%2Fwww.moodle.somedomain.com%2Fmod%2Fquiz%2Fattempt.php%3Fq%3D110%26amp%3Bpage%3D0

I am redirected to the question /question.php file and the command unknow message
appear, so i can not edit the question .

How can i fix it ?

In Moodle 1.8.2 it used to redirect to question .php?inpopup

Thank´s in advance
Average of ratings: -
In reply to Ângelo Rigo

Re: Error at Preview tab when editing a question

by Ann Adamcik -
You might be running into MDL-17919, fixed in 1.9.4.
In reply to Ann Adamcik

Re: Error at Preview tab when editing a question

by Ângelo Rigo -
Hi

Without upgrading is there a safe way to fix it? i already have installed moodle 1.9.4 to search for changes.

My current version is 1.9.3. Is some change at the mod/quiz/attempt.php file question/question.php file or mod/quiz/locallib.php?

Thank´s in advance
In reply to Ângelo Rigo

Re: Error at Preview tab when editing a question

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
With any tracker issue, if you click the 'version control' or 'all' tabs at the top of the comments, you get links to exactly what code was changed to fix the bug.

You need to use the changes that relate to the right branch (on branch 'MOODLE_19_STABLE'), and the links that look like (+2 -1 lines) are the ones that show you the changes.
In reply to Tim Hunt

Re: Error at Preview tab when editing a question

by Ângelo Rigo -
Thank´s Tim
Now i see clear the changes. Never try to clik in vestion control before, i add this tip on http://docs.moodle.org/en/Tracker.
In reply to Ângelo Rigo

Re: Error at Preview tab when editing a question

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes, I saw that in recent changes. Thanks.
In reply to Ann Adamcik

Re: Error at Preview tab when editing a question

by Ângelo Rigo -
Hi

I just change the get_question_edit_link method in question/type/questiontype.php the only diference was :
//1.9.4
if (!empty($cmoptions->cmid)) {
$linkurl .= '&cmid=' . $cmoptions->cmid;
//1.9.3
if (!empty($cmoptions->cmid)) {
$linkurl .= '&cmid=' . $cmoptions->cmid;

Thank´s in advance.