Not importing bulk questions in the quiz module

Not importing bulk questions in the quiz module

by Pratik Shah -
Number of replies: 36

Hi,

I am facing a very strange problem while importing a quiz file (having 660 questions approx.) into the Moodle system. I first exported 660 questions from the Moodle. The type of the file that was exported is "Moodle XML Format". After the export process was completed, I tried importing the same file (created at the time of export) . However, at the time of import, it just imported 169 questions (of 660 questions) , but the confirmation message it showed was "Importing 660 questions from the file".

On importing the same file second time, it just imported 166 questions and the message it showed was  "Importing 660 questions from the file".

Am I doing something wrong?

Is the file being imported has some issues?

I am attaching the XML file having 660 question which is being imported in the Moodle System

Please help

Thanking you in advance

Regards

Pratik Shah

Average of ratings: -
In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Pratik Shah,

There is something quite wrong with your quiz(660records).xml file.

It contains a large number of identical questions...

Something must have gone wrong when you did the XML export.

Which version of Moodle did you use for the XML export?

Can you try again and then check, using any text editor, that you do not have empty questions or repeated questions in the XML exported file?

Joseph

In reply to Joseph Rézeau

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Joseph,

Thank you very much for your reply.

I initially had 22 questions in my questions in my quiz databank. These 22 questions I first exported to an XML file using "Moodle XML format" . After that I imported this same newly created file (of 22 records) 29 times which created 660 qustions in my quiz databank. These 660 questons I again exported to a new XML file using the "Moodle XML format". I then deleted the entire question bank and tried importing this newly created XML file (of Moodle XML format) of 660 questions when I was landed up with this issue.

The version that I am using for this export activity is the latest one of Moodle . Also, does a file having identical questions can create a problem at the time of import, because it is true (as pointed out by you) that the file being imported contains identical questions. However, the XML format of file has not been tampered with, so I dont think that having identical questions in a file should not create an issue.

Waiting for your inputs

Thanking You in advance

Regards

Pratik Shah

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
All those exam type questions don't have any text for the question for a start - that can't be good! I think they are getting rejected as that is a required field. I need to investigate that one a bit more though. I'm a bit worried about how you managed to produce them. 1.8 shouldn't let you!

I'm also getting some notices that I don't like the look of in the latest (CVS) version of 1.8. I don't have time at the moment for a proper look, but if you can bear with me a couple of days....
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Thank you very much for your reply.   

I dont think (to the best of my knowledge) , there exists any question whose text field is left blank in the XML. But the thing is, at the time of importing the questions in the quiz databank, it gives me a summary of the actual questions being imported. For eg., Of the 660 questions that existed in the file, 169 questions were imported and all were perfectly inserted in the database. If the 170th question had any problems (assumed) it should have given me an error message, which did not happen in that case.

Again, if I import the same file second time, than (in my case), it imports perfectly upto 166 questions in the database and the import process stops. If the question being imported has any problems, then in second case 167th question should hava a problem, which is not the case.

FYI: I faced this issue when I cleaned the entire question and its dependent tables from the moodle database, added some different types of questions (short, essay, multichoice and TrueFalse) and then started the import / export process.

Waiting for your reply (at your convinience)

Regards

PS

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

first question:

<!-- question: 2812  -->
  <question type="essay">
    <name><text>Alam</text>
</name>
    <questiontext format="html">
<text></text>
   </questiontext>

...nothing between the text tags!

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Pratik,

I faced this issue when I cleaned the entire question and its dependent tables from the moodle database

You mean you deleted questions directly in the moodledata database? That is certainly NOT recommended. No wonder you got these problems afterwards... Also I quite frankly do not understand the rationale for the strange operations you described in your previous post:

I initially had 22 questions in my questions in my quiz databank. These 22 questions I first exported to an XML file using "Moodle XML format" . After that I imported this same newly created file (of 22 records) 29 times which created 660 qustions in my quiz databank.

It is difficult (actually impossible) to help you with the problem you posted in your initial posting, because you did not mention all those operations which you mentioned in your later posts, and which are - as far as I can say - not operations expected in the "normal" handlling of the questions database. But maybe Howard will find a solution.

Joseph

In reply to Joseph Rézeau

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ahhh... I missed that. Well, yes, you are kind of on your own if do things like that. I don't see any reason to do that in normal use.
In reply to Joseph Rézeau

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Joseph and Howard,

Thanks a lot for spending time and efforts to helping us to sort out this issue.

In context with the replies given by you on Friday, 18 May 2007, 06:08 PM and Saturday, 19 May 2007, 09:03 PM I would like to put on some points to the discussion:

Issue I:

First of all my sincere apology for handling the database in a Non - recommended way. However I was forced to do so due to the following consideration:

I had 600 records in my quiz databank which i needed to delete. I selected the option Show All 600 records in one page rather than 20 per page . I then selected all the 600 records by clicking on the Select All link and clicked on the Delete button, which redirected me to a new page asking me for a confirmation to delete with a Yes / No button. On clicking on Yes button, I got(am getting) an IE error The page cannot be displayed . On further investigation, it was found, that the URL at the time of delete was incomplete. The URL that occured in my case (at the time of deleting 600 records in a single attempt) was:
/a>
http://viz006/mod/quiz/edit.php?courseid=1&sesskey=7sohO3PvMc&deleteselected=4572,4571,4570,4524,4523,4522,4521,4520, 4519,4518,4517,4516,4515,4514,4513,4512,4511,4510,4464,4463,4462,4461,4460,4459,4458, 4457,4456,4455,4454,4453,4452,4451,4450,4404,4403,4402,4401,4400,4399,4390,4391,4313, 4374,4334,4338,4342,4346,4350,4351,4352,4353,4354,4370,4371,4372,4373,4395,4397,4398, 4396,4393,4394,4392,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4630, 4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4690,4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,4741,4742,4743,4744,4745,4746,4747,4748,4749,4750,4751,4752,4753,4754,4755,4756,4757,4600,4759,4760,4761,4762,4763,4764,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,5000,5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,5040,5041,5042,5043,5044,5045,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,5056,5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,5073,5074,5075,5076,5077,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,4539,4538,4537,4536,4535,4534,4533,4532,4531,4530,4529,4528,4527,4526,4525,4479,4478,4477,4476,4475,4474,4473,4472,4471,4470,4469,4468,4467,4466,4465,4419,4418,4417,4416,4415,4414,4413,4412,4411,4410,4409,4408,4407,4406,4405,4379,4378,4377,4376,4375,4331,4335,4339,4343,4347,4355,4356,4357,4358,4359,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,4596,4597,4598,4599,4645,4646,4647,4648,4649,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,4804,4805,4806 ,

The above issue was faced by me in IE7.In case of Firefox, I did not faced this issue. The entire 600 questions got deleted in a single attempt. Please refer to the following URL for your immediate reference

http://www.boutell.com/newfaq/misc/urllength.html .

Issue 2:

It was then suggested by you to try again with the entire process with a precaution that no question is repeated together and none of the tags are left blank.

To that, I created a new XML file of 600 records with all different questions and then tried to import that newly created file. However, the issue of incomplete import still persists. I have attached the file for your reference.

Issue 3:

In my previous conversations with Howard, I was informed that in Moodle (v 1.8) the <text></text> tag for "questiontext" field cannot be left blank.

As per my requirements, I had customised my MOODLE setup. I had kept the usehtmltexteditor property to False . So when i proceed to add a new question, the Question Text textbox is shown blank. If the user don’t enter any text inside this textbox and click on Save Changes or Save as new question button (assuming that the user had entered all the mandatory fields marked in red), the question gets saved with a blank question text.

After that I exported this question to a new XML file (using the MOODLE XML Format). In that file the <text></text> tag for "questiontext" field was blank, since I did not enter anything in that text box at the time of editing/adding the question.

Now, the user imports this newly exported file, he gets an error message "Error importing question Missing question text in xml file " and the import process stops.

Summary : There is no validation for the "Question Text" field at the time of editing / adding a question, However at the time of import, the same field is being validated for blank condition.

Waiting for your reply in this context.

Kind Regards,

Pratik Shah

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yess... there's some issues here!

I'm looking at it at the moment. Thanks for the clarification.
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Thank You very much. Please have a look at all the 3 issues since all the 3 issues are very much critical.

Thanking you once again for your efforts

Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ok, I have removed the requirement for questiontext. The new version of question/format/xml/format.php is attached.

Can you try that and let me know how you get on?
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Thank your very much for your immediate response.

However, unfortunately, I am off the work now and will get back to you tomorrow with the appropriate feedback. In the mean time, I would  be very thankful to you if you can look into the other two issues (majorly the Import of the bulk Questions  and the bulk delete since both the issues are very critical) as per your convenience.

Thanking you

Kind regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi,

I think the revised code fixes two of your problems. Please let me know if it doesn't.

The bulk delete is possibly one for Tim. I'll raise a bug report!

http://tracker.moodle.org/browse/MDL-9881
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Thank you very much for your response.

As suggested by you in our previous discussion, I downloaded the file (format.php) given by you and copied it into my c:\Xampplite\moodle\question folder. Now when I click on "Import" / "Export" link my code is not getting executed. None of the HTML controls are being displayed on the page.

On investigation, it was found that in "import.php" (because it was the import module I was investing) there was a statement.

$fileformatnames = get_import_export_formats( 'import' );

This statement uses a function get_import_export_formats (located in questionlib.php)which fills the File Format dropdownlist box with a list of different types of file format. I would like to bring to your notice that this function is not being executed when I copied the file given by you. However, the same function gets executed perfectly when I use the format.php which I downloaded yesterday with the Moodle 1.8 stable Package. 

FYI: The function (get_import_export_formats) includes the file format.php. It also refers to some of the functions  defined in the format.php.

Also I downloaded the latest MOODLE yesterday morning. I found that the fomat.php file that existed in that folder downloaded yesterday was about 17 KB, whereas the file given by you given by you is sizing about 40KB.

Apart from that, the format.php (given by you) includes a reference to xmlize.php file of the lib folder, which was not present in the original file  of the Moodle stable package which I downloaded yesterday morning.

Is that I am missing something? Shall I download the entire Moodle Package again?

Waiting for your response...

Kind Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You didn't read the directory path !!!

question/format/xml/format.php

NOT

question/format.php

(of course you've now overwritten the format.php in the question directory)

In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Ahhh.... Very sorry. It was my mistake to have not read your instructions carefully.

Sorry to waste your time.

As far as the "questiontext" issue goes, the file is being imported properly without displaying the message. The file is being properly imported even if there is no value in the <text></text> tag of the questiontext tag.

However the issue of importing 600 questions in a single attempt is still not yet solved. Of the 600 records in the file it just imports 125 questions and the further execution of the code stops.

I am attaching the file again for your reference.

Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Mmmm..... it works for me. All 600 questions imported.


If you haven't already, can you turn debugging up to developer strength to see if anything useful shows up.


EDIT:
Just to confirm that I tried your last attachment and all 600 questions imported with no problems.
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi,

What are the things needed to be considered when these 600 questions are being imported (If I have a file of 300 questions it is being imported perfectly. So what could go wrong with a file of 600 questions.)?

Firstly, since I am importing these questions on my local machine, the internet speed does not come into question.

Secondly, if the file has been perfectly imported at your end, I dont think that the format of the file could be an issue.

Is there anything else that could terminate the import process.

I had downloaded the MOODLE release yesterday morning (its next day evening now, almost 36 hours after the download). Shall I take a new one and then try with the import process.

Please help with any other suggestions(if I have skipped). I will then try to debug at my end based on your comments.

Thanking you

Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Pratik,

Have you turned on debugging?

What *exactly* happens? Does it look like it has imported 600 but it just doesn't? Did you select any options on the import page different from the default?

Questions are imported in two passes, so it must have parsed the file without errors to load any (unless you unchecked the 'stop on errors' option).
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Please find attached 2 zip files (one with this reply that contains Screen I and Screen II and other one in the next additional reply which contains Screen III and Screen IV) , which altogether contains 4 screenshots.

The first screen shows the option that I have selected at the time of importing the file.

The second screen shows the confirmation message Parsing questions from the import file and then Importing 600 questions from file and then the Import process begins.

The third screen shows that after 121 questions being imported the import process has terminated. However there is no message like Done or Done with errors  at the bottom left corner of the status bar of the IE.

I then again imported the same file second time. This time (Refer fourth screen) it shows that after 187 questions being imported the import process is terminated. and the message "DONE" (circled in red) is displayed at the bottom left corner of the status bar of the IE.

 As far as the debuggin goes, I have ZEND IDE installed on my machine, but due to some reasons I am not able to debug it.

Please help

Thanking you

Kind Regards

Pratik

In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -
Pls find attached Part II whcih contains Screen III and Screen IV
In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is definitely bombing out before it completes.

By debugging, I specifically mean switching on "Moodle" debugging. The options is available from the Administration block on the front page of your site. Look for "Server" and then "Debugging". Switch debug messages to "DEVELOPER".

If that doesn't show anything up you should check your logs. Some info is here:

http://docs.moodle.org/en/Installation_FAQ#Why_is_a_particular_page_blank_or_incomplete.3F
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Got the issue resolved.

Many many thanks for all your efforts dedicated towards this issue.

FYI:

Thanks to your debugging suggestion that helped me out to resolve this issue. Ths issue was in the Configuration File (php.ini). There existed a property with a name max_execution_time which was set to 60 seconds. However, the import of this file of 600 questions takes approximately 1.5 to 2 minutes . Due to this above restriction of executing each script for 60 seconds, once the 60 seconds are over, the import process stops executing. However, due to the debug suggestion provided by you, the error got logged in the file, through which I got the root cause of the issue.

I would be very thankful to you if you can suggest me as to what should be the default time that I could provide to this max_execution_time property. I have kept 10 minutes as of now. Is that OK?

Is there any functionality in MOODLE, where in I can set the time limit for a particular process, keeping the max_execution_time property to 60 seconds. By this I mean that I wish to keep more execution time for only selected process like Import of quiz / export of quiz and so on. For rest of the process, let the maximum execution time be the same as defined in the php.ini file

Waiting for your reply for the last issue (deleting bulk questions in IE) and also your valuable suggestion at your convinience

Thanks a ton once again

Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The IE problem is fixed. Tim Hunt just fixed it.

There's no simple way of restricting the execution time. What is reasonable is difficult to answer. Even on my quite old test server, those questions imported in less that 30 seconds for example - it depends on your local situation.

Glad you sorted it out anyway smile
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In backup and restore, I know they extend the time limit by calling set_time_limit() http://uk.php.net/set_time_limit every so often. Perhaps we should do somthing similar for import and export.
In reply to Tim Hunt

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'll have a dig through the backup and restore code and see what happens there then.

I don't think anybody's mentioned it as a problem before. I wonder if it's a local problem with the user's configuration?
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It is probably just that noone with a slowish server has tried to import that many questions before.
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi,

Thank you very much for solving the delete issue in IE (Thanks to Tim also). It  would be very great if you can provide me with the changes (alongwith the files in which this change took place), since I wanted to rectify this issue in ver1.7 only.

Waiting for your response

Thanking you once again

Kind Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Here's Tim's diff:

 
Index: editlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/question/editlib.php,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- editlib.php 22 May 2007 13:24:51 -0000 1.66
+++ editlib.php 22 May 2007 14:04:06 -0000 1.67
@@ -482,8 +482,9 @@
$questionnames .= '
'.get_string('questionsinuse', 'quiz');
}
notice_yesno(get_string("deletequestionscheck", "quiz", $questionnames),
- $pageurl->out_action(array('deleteselected'=>$questionlist, 'confirm'=>md5($questionlist))),
- $pageurl->out_action());
+ $pageurl->out(), $pageurl->out(),
+ array('sesskey' => $USER->sesskey, 'deleteselected' => $questionlist, 'confirm' => md5($questionlist)),
+ NULL, 'post', 'get');

echo '';
echo '';
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Note that the diff on the 1.8 stable branch is a bit different.
In reply to Tim Hunt

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I couldn't find the 1.8 diff. The tracker id doesn't seem to be mentioned.
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The change in 1.8 is in question/showbank.php, and it does mention the bug number, but CVS has been really unreliable recently, so the tracker may not have noticed this change.
In reply to Tim Hunt

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Tim / Howard,

Re. the above context, I have posted a doubt on the forum. I am awaiting the reply for the same from your end.

Regards

Pratik

In reply to Pratik Shah

Re: Not importing bulk questions in the quiz module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard, Tim and Joseph

Thank you very much for all your efforts and time dedicated towards my issues.

My all the priority issues has been sorted out perfectly.

Apologies for any confusion happened during the conversation.

Once again, thank you very much.

Kind regards,

Pratik

In reply to Howard Miller

Re: Not importing bulk questions in the quiz module

by Pratik Shah -

Hi Howard,

Thank you very much for your response.

However, I have certain doubts which I would like to clarify:

1. Are these changes needed to be done in \moodle\question\editlib.php

2. How to interpret the 2 "-"(minus) signs and 3 "+"(plus) signs against $pageurl variable which is present in the code sent by you.

3. If the code changes has to be made in editlib.php of \moodle\question folder, first of all there are none of the above - mentioned code lines in that file. In fact, I found the first 2 lines of code in the showbank.php file of "moodle\question " folder.

I highly apologise for this confusion, but I am not able to figure it out as to where these changes are really needed to be incorporated.

Please help

Thanking you in advance

Kind regards

Pratik Shah