Poruke koje je napisao/la Tim Hunt

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

There is no limit.

Well, users are stored in the database, and the database is stored on disc, so the size of the hard disc in your server imposes some (huge) limit, but then if you want more, you can buy a bigger disc.

Moodle in English -> Quiz -> Quiz results -> Re: Quiz results

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The answer to this is: No, but ...

No, this feature does not exist in standard Moodle.

But:

  • People have developed plugins like https://moodle.org/plugins/view/mod_offlinequiz
  • And, for testing the quiz reports, Jamie Pratt make a way to export and import quiz attempts, but only for testing, not for real use, so I don't know how reliable it is.
  • Also, backup and restore is able to export and import quiz attempts as part of what it does.
  • So, if you are prepared to write some code, you might be able to make something work, but it really depends on exactly what you are trying to do.
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Well, Google just found me http://db-engines.com/en/ranking/relational+dbms, which suggests Moodle chose the right 4.

My own opionion is that Postgres is amazing, and open source, so everyone should just use that namiguša

In my opinion, there is nothing against adding more in principle, but someone would actually have to do the work. I think there are more important things to work on, but this is open source. Anyone can volunteer to do anything.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Well, back in 2006 when the current database abstraction layer was being developed, those were the four databases they chose. Since then, there have only been occasional flurries of interest in supporting something else. (The two I am aware of being talked about are SQLlight and IBM DB2, but neither effort got to a working system, I think.)

I am not aware of a database management system called SAP. Do you have a URL for what you are talking about?

The reason to support Oracle is that some IT departments insisit on only using Oracle. Therefore, if we did not support Oracle, they would be shut out.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

"What can we expect from a Oracle and Moodle integration?"

You can expect things to be a bit slower. There are two main problems:

1) Oracle cannot tell the differences between the empty string "" and NULL. Moodle, however, uses both values and the difference is important. Therefore Moodle has to check all data going to and from the database, and replace empty string with another value. That slows down every interaction with the database.

2) Moodle handles a lot of textual content (CLOB columns in the database). The Oracle protocol for communicating between the database and the application server deals with CLOBS in a really inefficient way, which also slows things down.

There is a third problem not related to performance:

3) Since very few people use Oracle with Moodle, then if there are database-specific bugs (which are rare) then things are more likely to break on Oracle than on MySQL or Postgres. Also, if a community plugin fails to work on some databases, it is more likely that the one that fails is Oracle.

Therefore, you should only use Oracle if you really have no other choice.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Since essay questions have to be manually marked, they cannot give immediate feedback. Therefore, however other questions in the quiz are set up to behave, essay questions use a special 'manually graded' behaviour.

It might be easier to advise you if we had a real example of the sort of question you want to ask.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The general idea is to first add a 'Description' item. That is not a question, but some text (which could contain images, multimedia, etc.) Put your passage in there.

Then add the questions after that.

You probably want to use the quiz editing controls to ensure that the passage of text and the questions are all on the same page.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Do we have a good deprecation process for web service functions?

If this was a Moodle internal API, we would

  1. Implement the new function / class / whatever API change.
  2. Modify the old functions so that using them causes a warning message.
  3. Announce in the release notes for that Moodle release that the old API is now deprecated.
  4. A few Moodle releases later, remove the old API.
  5. Announce in the release notes for that Moodle release that the old API is now gone.

That is a good system. Can we come up with an equivalent for web service APIs?

The only place I can think of to put the warning message is in the PHP logs on the Moodle server, and they are highly likely to not be seen. However, I hope there is a better option that I have failed to think of.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I am not really sure what is going on here. It does not seem to correspond to any existing bug report.  https://tracker.moodle.org/issues/?jql=project%20%3D%20MDL%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20Questions%20AND%20component%20%3D%20Backup


I don' think that the use of random questions in your quiz is significant to what is causing the problems. However, once you have duplicate questions, then the random questions in the quiz may select the 'same' question more than once.

My best guess at the root cause is that it is cause by backup and restore (or something like 'duplicate activity', or rolling a course forward between semesters, that uses the backup and restore code behind the scenes). Reasons for this are the duplicates are attributed to an admin-type user, likely the person who did the roll-forwards/duplicate.

To really understand what is going on, we need to find what triggers a new duplicate to appear. (What often gets called "Steps to reproduce".) Something like 

  1. If my Moodle site is in this state.
  2. And I do this action.
  3. Then a new duplicate appears.

The work of analysing what is going wrong, to get the simplest possible steps to reproduce, should not be underestimated. But it is a vital part of the process of fixing a bug like this. Once you have a reproducible way to trigger the problem, it becomes much, much easier to fix.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Well, I would not put the information inside the blue question box. Instead I would keep it as a separate grey box (or whatever colour) but make it horizontal above the question box, rather than to the left.

Note that the CSS to do that would be simple. What is more irritating is that first you will have to find all the CSS rules that standard Moodle applies to those boxes, and undo all those rules. But, still perfectly doable. Just use your browser developer tools tools.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Actually, it does not require any PHP magic. Just some CSS, which any theme designer could do. (Though it is also all done with renderers, so any theme designer could also change the HTML output by writing some PHP code if they want. See https://docs.moodle.org/dev/Overriding_a_renderer.)

I am rather disappointed that over the years there have not been more different designs created for the quiz in different themes.

Moodle in English -> Security and privacy -> CSRF on moodle pages -> Re: CSRF on moodle pages

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

In almost all cases, $CFG->httpswwwroot is the same as $CFG->wwwroot, which is common.

The only place where they are different is when you have the 'longinhttps' setting turned on. That is, the site uses https for login, but nothing else.  (In which case wwwroot will be http, but httpswwwroot will be https.) This is no longer recommended. If you care, you should be using https for everything these days.

Moodle in English -> Security and privacy -> CSRF on moodle pages -> Re: CSRF on moodle pages

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

1. When you started this forum thread, did you see the big warning "This is not the right place to report security problems" with a link to the right way to do it?

2. That appears to be just a random list of file names. There is no information why anyone thinks there is a XSRF problem with any of them.

3. Moodle does protect itself from XSRF, as explained on https://docs.moodle.org/dev/Security:Cross-site_request_forgery.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Thank you for continuing to share your frustrations with us. It is important for us to know where new users struggle, even if it is not always pleasant reading. (The more constructive you can keep your comments, the easier it is for us.)

You don't set the grade for a question in a quiz in the question bank. You set it right on the Edit quiz page, where you suggest it should be set. In your other thread I just gave the link to that specific bit of the docs: https://docs.moodle.org/29/en/Building_Quiz#Assigning_points_to_questions

The 'Default mark' in the question bank is just that, a default. That is the maximum mark that is used when a question is first added to a quiz, but you can change it later on the Edit quiz screen. (But, if you know this particular question will normally be work 7 marks in quizzes where it is used, then you can save yourself a bit of time by setting that default.)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I guess the recently created issue MDL-51255 is about roughly the same thing. You need to know there are two things: the quiz settings, where you control various settings for the quiz like how many attempts are allowed, and then the Edit quiz page, where you build the quiz out of questions. Somehow, we need to make that obvious to new users. Suggestions welcome.

Now that you have found the Edit quiz page, is it reasonably intuitive? Any suggestions for improvement there? Thanks.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

You should really override the image in your theme. See https://docs.moodle.org/dev/Using_images_in_a_theme, particularly the section about overriding near the end.

The whole reason that system exists is to solve the problem you are talking about.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

1. If you set the mark for each question to 0, and also set the maximum grade to 0 at the top of the Edit quiz page, then there should be almost no mention of grades left in the UI. (If there are, it would be helpful to see a screen-grab, because it might be a bug.)

2. Mary already mention the Language customisation docs.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I can't think of anything that chnaged in the quiz that might have caused this to start happening in Moodle 2.9. Things did change in the gradebook in Moodle 2.8 & 2.9, so I am moving this to the Gradebook forum to see if anyone there can help.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

It looks like you have not started any particular pools.

https://github.com/maths/stack_util_maximapool/blob/multiple-pools/doc/server%20setup.txt is the key doc.

Once you have created the folder like /var/lib/maxima/2013073001/, you need to start that pool. On the status page http://example.com/MaximaPool/MaximaPool do

  1. Scroll to the bottom and press "Re-load pool definition".
  2. That should find the configuration.
  3. Click the "Run the low-level health-check" link for that pool to verify it works.
  4. Click back to get back to the status page.
  5. Click the "Start this pool" button for the new pool.
  6. Wait a bit for the new pool to start up. If you keep reloading the status page, you should see the number of active processes go up to whatever value you set.
  7. Click the "Run the high-level health-check" button for the newly started pool to verify that that works.
  8. Click back again.
  9. Only  then try to evaluate 1+1 using the form on the status page.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

There is no easy way to get an email notification of that (I think).

An option that might work is to look under Quiz administration -> Results in the quiz. Various tables of information there which you can sort by clicking on the column headings. That can let you identify students that need particular help, or alternatively poorly answered questions that show that most students are struggling with a particular topic.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I think this has got to the point where you should create a tracker issue with the information you have, and link to this forum thread.

Possibly the only way to debug it more from here is to put some extra debug code into the delete temp files task, to print the relevant time-stamps of every file it considers, and whether it then deletes it or not. However, I don't know if that is within your level PHP programming skills. Perhaps someone could give you a chunk of code to copy and paste, but that person is not me right now.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

It would be worth looking at the time-stamps of the files that Moodle is deleting. Moodle should only be deleting files that are more than 7 days old, or something. How old are those files really? How old does Moodle think they are? Is that because the get the wrong time-stamp when they are written, or do they have the write time-stamp, but somehow Moodle does not see that?

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Well done for finding that bug Joshua. That could well be the cause.

Have you managed to establish an exact time-line for what is happening? That might give some clues, but since you don't want to sit up all night, it would probably need to be re-constructed from log files. When cron runs, it outputs quite detailed log information, but it is not very standard where/if that it saved. Can you track it down?

The automated clean-up of 'old' backup data does have a config setting configtempdatafoldercleanup. Can you try making that longer, and see if that 'solves' the problem. Oh, I see. It seems to default to 7 days (the longest). That does not seem like a problem.

Very odd.


Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

ForumNG for Moodle 2.8 certainly exists. We have been running it at the OU for the last few months. And we are just testing ForumNG with Moodle 2.9 now. Apologies if we have failed to push the latest versions to the plugins DB.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

My suspicion (and this is only a guess) is that the padlocks are there, but are invisible because of the particular theme you are using.

My suspicion is aroused by the fact that the pen icon next to the grades 1.00 looks funny, and may be that is not the only thing wrong.

If you are familiar with using developer tools in your web browser (right click and say 'Inspect element') you could try using them to see if the padlocks are there in the HTML.

Alternatively, a simpler test might be to try to create a simple quiz at demo.moodle.org. If it works there, you know the issue is specific to your site. If you can reproduce the problem on demo.moodle.org, then it is much more likely to be a Moodle bug.

Moodle in English -> Quiz -> 2.8.3 number of attempts -> Re: 2.8.3 number of attempts

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

So, the 'right' way to implement this, in terms of Moodle code architecture, is to make a new Quiz access rule plugin that is like the standard one that limits attempts, but which only counts the ones that were actually finished.

Look at the state column in the quiz_attempts table to identify complete attempts. See this method for how you can replace the standard attempts rule.

Apologies for any earlier snark. Before I was posting before dinner and was hungry.

Moodle in English -> Quiz -> Importing QTI quizzes -> Re: Importing QTI quizzes

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The error is saying that when your Moodle tries to download the .zip file from the plugins database, it gets a 403 Permission denied error. I don't know why that should be. The link (https://moodle.org/plugins/download.php/7246/qformat_canvas_moodle28_2014110301.zip) works for me when I try it manually now.

It could have been a temporary thing. It might be worth trying again now. Or, it could be some sort of firewall thing. It might be best to ask in the Installation problems forum, since it is an install problem more than a quiz problem.

Moodle in English -> Quiz -> 403 Forbidden -> Re: 403 Forbidden

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I think this is not a Moodle error. I think your web server is blocking these pages due to heurstics that are designed to block certain sort of URLs that look a bit like certain sorts of hack attempts against badly designed applications.

It comes up from time to time, e.g. https://moodle.org/mod/forum/discuss.php?d=107067 or https://moodle.org/mod/forum/discuss.php?d=216970.

You need to find what spurious rule your web server has decided to apply by default, and turn it off.

Moodle in English -> Quiz -> Question duplication error -> Re: Question duplication error

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Is there more than one error message on-screen when the problem happens?

Although you say this happens during duplicate (which would show up as backup/restore in code terms) there is no mention of that in the stack trace.

The thing there is a mention of in the error is block_mentees, but only as part of displaying the site front page. Are you seeing this error after you have been returned to the site home page? If so, that does not tell you what went wrong with the duplication.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

delete_quiz_attempt will only work if you pass in the correct parameters. If you do, it will delete the attempt, and that is the right way to do it. (Make sure you have Debugging set to DEVELOPER while you try to make this work.)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Not really.

After 2.9 will come 3.0, but that is not any different from the change from 2.8 to 2,9.

In Moodle terms 2.x -> 2.y (or 2.9 to 3.0) is a major version, and may have API changes (which are normally documented in the release notes.)

2.9.z is a minor version. We don't number patches, but every week there is a 2.9.z+ weekly release. All patches are, of course, available from the git repo.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The stack trace basically illustrates what I mean about Moodle's transaction handling. Moodle uses moodle_transaction objects to track transactions. The transaction is started in the constructor. There is code to verify that you only call moodle_transaction->allow_commit() once per transaction.

For you to get the error message you are seeing something very weird (not normal execution of Moodle code) must be going on.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Sorry, no idea. I have never seen an error like that, and given the way Moodle handles exceptions, I cannot think of any way that a COMMIT could be done if a transaction had not been started with BEGIN.

Can you reproduce the problem without LoadRunner being involved? Can you set Debugging to DEVELOPER level so we also get a stack trace for the error?

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

"Since the errors are 404 File not found, there were no HTML return for the requests."

Wrong. E.g. go to https://moodle.org/mod/forum/discuss.php?d=-1 That is a 404 and there is a HTML respone too including the error message.

Is your load-testing system handlng logins correctly, or is every request (that is no a 404) ending up as a redirect to login/index.php?

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Can LoadRunner save the HTML of each page it requests? I have only used JMeter for load-testing and it can. Having the HTML of each page lets you see any error messages.

Then, to get error messages, you probably need to turn on Debugging. You probably want that off in real user, and hence when you are really load-testing, but to diagnose this problem you need to turn it on temporarily.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

You don't.

I know it is a pity not to take advantage of something the database could do for you automatically, but because Moodle has to work on four different database engines, and they all handle dates slightly differently, we just set all dates in PHP.

If you make the column NOT NULL without a default, then at least you will get an error if any function fails to set it.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The API is all documented with PHPdoc comments. There is not a compiled HTML version of the docs available online (http://phpdocs.moodle.org seems to be dead) but you can just read it in the code. E.g. https://github.com/moodle/moodle/blob/master/lib/outputrenderers.php#L3702

OK, I see what you mean. The docs for that function are missing the description of some arguments. That is bad.

Also, there are overview developer docs online at https://docs.moodle.org/dev/Main_Page

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Sorry, it looks like that version of the plugin is not compatible with Moodle 2.6 after all. I have updated the plugins DB entry.

Now, the question is how to downgrade that plugin in your site. It can be done, but it is a little fiddly. I someone with a bit more time than me today can write out the steps for how to do it.

(If you have not created many questions yet, you should be able to just uninstall the plugin, then re-install a more compatbile version.)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The progress bar during backup suffers from the same problem as progress bars during all complex operations.

To give a massively simplified example, suppose that doing a backup only required these three steps:

  1. Step 1
  2. Step 2
  3. Step 3

And stuppose that normally steps 1 & 2 are slow, and 3 is quick.

Then, in the overall progress bar that shows the progress of the backup, you might make Step 1 and step 2 each represented by 45% of the progress bar, and step 3 be the last 10%.

However, in any given course, the actual times may not break down like that, if the course is unusual. E.g. we might zoom through the first 45% of step 1, then go slower in step 2 and really grind to a halt in step 3.

Of course the real backup is much more complex that this. There are many separate stages, and I don't know how much of the progress bar each one takes. However, what is probably going on is that for your corse, one step at the end that is normally really quick is getting bogged down.

I can't think of an easy way to find out what step that might be.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Does the quiz have a time-limit? If so, it will have been submitted that amount of time after the students started.

Also, just because the quiz settings do not currently show a close date, there could have been one in the past, and then the settings were later altered (once the teacher realised the problem with the settings they had originally).

The only other place there might be a time-limit or close date is under Quiz admininstration -> User/Group overrides.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

That is irritating. In this case, since the error is appearing in a JavaScript pop-up, then you might be able to get more information like this:

  1. Use a web browser with good debugging tools (Firefox or Chrome)
  2. Press F12 to open the developer tools.
  3. Swtich to the Network tab.
  4. Try the duplicate again. Hopefully you can see the request that fails. It will probalby be in red.
  5. Switch to the Consle tab in the developer tools and see if there are any other clues there.
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I fear that it is a mixed blessing that we have the nice clear 'Edit quiz' button when you first create a quiz.

That makes it obvious what you have to do then, but it does not teach you that what you will have to do later, to modify your quiz, is to look in the Administration block.

Probably, rather than the 'Edit quiz' button the first time, we shoud have a big red arrow pointing to 'Edit quiz' in the Admin block. However, doing that so that it works in any Moodle theme would be rather hard.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The built in manual grading tool assumes you want to grade all the different students answers to question 1 at the same time, because that is normally more efficient that grading student 1's answers to all the different questions.

However, it is not always the case, which is why we made this add-on: https://moodle.org/plugins/view/quiz_gradingstudents

Where, on your paper quiz, you have three related questions like

(Questions 5-7) In verse 2:3, what 3 things does man seek to do?

5) Self-preservation

6) Self-gratification

7) Self-propagation


then in Moodle that probably works better as a single question worth 3 marks.


Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Have a look at Quiz administration -> Results -> Manual grading.

Also, "They are shot answers that can be stated in several different ways, so we can't use auto-grading" is not necessarily true. See https://moodle.org/plugins/view/qtype_pmatch

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers
Moodle has the facility to use different 'message outputs' not just email. Not many have been implemented (https://moodle.org/plugins/browse.php?list=category&id=24) but there are some other options.

If you set up those other options, then you can send outgoing messages there instead of email. https://docs.moodle.org/29/en/Messaging_settings
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

1. If you use Moodle 2.9, issue 1. is no longer an issue. This was changed by MDL-6340.

3. Is not how Moodle random questions are designed to work. I don't understand how this requirement relates to point 2. If the students can only do a quiz during certain sittings, doesn't that automatically force them to wait before re-attempting. Anyway, the only way I can think of to do this is for you to manually randomise it, and make separate quizzes: Quiz for Session 1, Quiz for session 2, etc. Of course if you do that, combining the scores later will be a pain.

However, this also seems to conflict with requirement 1. Suppose there are 5 available sessions. Suppose that Student A does attempts in session 1. Student B does attempts in sessions 2, Student C in session 3, Student D in session 4. Then in session 5 they all want to make their second attempt. One of the students is going to have to see a repeated question.

4. Can be done a better way. Edit the definition of the Role that is doing the grading, and remove the quiz/grading:viewstudentnames capability. That will prevent them from seeing names while grading. (Note, this is not secure, if the grader goes searching round the UI, they can probably work out which student gave which response. However, if they stick to the grading screens, it is really anonymous. You can make it more secure by removing other capabilities. E.g. a grader role with just mod/quiz:view and mod/quiz:grade may be what you want, but test it.)

5. You cannot do this in Moodle, but you can later download the results as a spreadsheet from Quiz administration -> Results -> Grades, and check for these questions there. (I think it would be safer for someone to be checking this for the whole quiz, not relying on each marker to do this one attempt at a time.)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

There are Moodle sites at http://qa.moodle.net and http://demo.moodle.net that you can use for testing. (They are reset every hour.)

Or, you can get a Moodle site https://moodle.com/cloud/ for free.

However, I am sure you will also get some beta testers from here.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

As you may know, Moodle now has an automated testing system called Behat. That can test Moodle by pretending to be a user, and going around clicking links and buttons, and filling in forms, and checking what is displayed as a result.

The questionnaire module does not currently have any tests like this, but I might be able to free up a day to make some. (I need to test the questionnaire still works for us now the OU has upgraded to Moodle 2.9. I would rather spend a day creating automated tests than half a day testing by hand namiguša)

However, I don't feel confident that I know all the Questionnaire functionality. So, I was hoping that one of the exports here could give me a list of steps for doing a basic, but fairly complete, test of the questionnaire functionality. Thanks in advance if you can.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

That looks about right. I am pleasantly surprised that it is such a small amount of code.

If you don't have just one question per page, then $slots would be a comma-separated list, so you would need to split it and have some sort of loop, but obviously you don't need that.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Don't try to do this in the adaptive question behaviour. That breaks the encapsulation that is the whole point of the software design.

The place to try to do this is in mod/quiz/processattempt.php. There, you have access to the state of all the question on the current page (after the response have been processed) and if they are all right, you can adjust the variables for which page to go to next before the redirect happens.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The link is in the grade_items table.

For example, from this example query, https://docs.moodle.org/29/en/ad-hoc_contributed_reports#Course_Content.2FWeek look at these joins

LEFT JOIN prefix_course_modules AS cm ON cm.course = c.id AND cm.SECTION = cs.id 
JOIN prefix_modules AS m ON m.id = cm.module
LEFT JOIN prefix_grade_items AS gi ON gi.courseid = c.id AND gi.itemmodule = m.name AND gi.iteminstance = cm.instance
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I'm not sure if it is documented yet. I had to go and check the code. I hope Mary C sees this thread.

How it currently works

At the moment the logic is simple: When you click the re-do button, the max score for your existing attempt gets set to 0, so it does not count, and the score that counts will be the score for your new attempt, if you finish it.

How it should work

I am pretty sure that is not the logic I was asked to implement. I think it should take the highest score of all the  re-dos you have done. However, that is not easy. The problem is that the review page, and the quiz grades/responses report always shows the last re-do of each question. If that last re-do is not the one that contributes so the grade, it is going to look weird, and make the grades report useless.

And, the only way I can think to get around that is this: When the student clicks Submit all an finish and we have graded the final attempt at each question. Then check each slot, and if the current re-do does not have the highest score, then re-order them so that the highest scoring one is last. Unfortunately, then you lose the information about which order the student did the re-dos in, and that will also be slightly confusing.

So, what we would have to do is, when they Submit and finish, do the re-ordering, but also store the original order, and use it to keep the UI un-confusing. And, while that is a bit of work, it is not actually that hard. So ...

Should we change it?

I think yes. Because the whole point of re-do is to encourage students to practise more, and with the current scoring students have an incentive to stop practising after they have got the question right once. It would be nice to think that students don't care about scores when they are practising, but that would be naive. 

However, what I think is not very interesting. I would much rather know what the teachers in this forum think.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

... but, the breadcrumbs already have a back to course link, and people don't see/use it. Will adding a button near there really help? Or will it end up being bad duplication of the link?

Also, it is worth remembering that in the very olden days (up to Moodle 1.9) every page had a button bottom centre. Within a course, that was always a link back to the course. For the course page, it was a link back to the front page. For some reason that was removed. (Probably to try to make the navigation more consistent namiguša)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

There are a bunch of small changes I would like to make to improve the flow of the quiz for students. One of those is a bit like what you suggest here. See https://moodle.org/mod/forum/discuss.php?d=262467 and MDL-46090.

Unfortunately, I keep not getting time to work on those.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

No. For quetions allowing mulitple responses, you do need negative scores on the wrong answers. There are seveal ways you might set it up:

  • If you want partial credit, I would do 3 right answers with 33.3% each. 4 wrong answsers with -33.3% each. That way each wrong answer selected cancels out one right answer.
  • If you want to punish wrong answers severely, do 3 right answers with 33.3% each. 4 wrong answsers with -100% each. That way any wrong answer selected makes the final score 0.

(For questions with multiple responses, the final score is never below 0.)

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

At the moment, what we have is: https://moodle.org/dev/contributions.php and pages like https://moodle.org/plugins/browse.php?list=contributor&id=2246

Perhaps we could add a page to the plugins DB with a table listing names, and number of plugins contributed to.

Anyway, if you make public contributions to Moodle, you can already get a fairly official link that documents that. So, that is a good start. Not sure what more is feasible.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

I think a bigger problem is that many people (including most active contributors) have both a moodle.org account and a tracker account, probably with different usernames.

To switch to single-sign-on, you would have to find some way to change the user names in one place to be consistent.

That would be really hard and probably time-consuming, so many other things have higher priority for getting done.

Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

Right, if you put questions in the area for a specific quiz, then those questions can only be used in that one quiz.

This has its uses. For example, if you are creating a final exam for your course in Moodle, then you really don't want those questions accidentally reused in another quiz.

If you have created some questions in the 'wrong' place, then you can move them later using the Question bank pages.