Publicaciones hechas por por Itamar Tzadok

The first issue you describe sounds like the 'adaptive mode'. You need to open the quiz settings and disable it (see image below).

I'm not sure I understand the second issue. In principle a student should be able to see only his/her score. You can omit the score altogether by not selecting it in the preview options but you might also need to hide the corresponding gradebook item and even disable activity report.

Hope any of this helps. sonrisa




Anexo adaptivemode.png

Moodle in English -> Quiz and question banks -> download sort -> Re: download sort

por Itamar Tzadok -
I don't know a way to download the file sorted but I know a couple of Excel functions that may allow you to sort your downloaded data and even reference records from one worksheet to another. If that may be of interest to you let me know what you would like to do with the downloaded data and I'll devise a way to do it in Excel. sonrisa

Yes it is RSS so the database's RSS should be enabled and you can copy the single view template to the RSS template so that your desired format will already be stored in the RSS and all that will remain is to display it. And then ... you open for editing a label resource, html block, section description or any other editable html section and in text mode add an identified div element and two script elements. This solution assumes that the load and display functions reside in a js file and referred to from the main page--that's the first script element. The second script element is for calling these functions and writing the content into the div element. Here is how it may look:

<div id="DataWarmUp"></div>
<script type="text/javascript" src="http://--------------/moodle/file.php/---/scripts/xmlutils.js"></script>
<script type="text/javascript">
var currentWarmUp=loadXML('http://----------------/moodle/rss/file.php/-------/---/data/--/rss.xml'); document.getElementById('DataWarmUp').innerHTML=displayDesc(currentWarmUp); </script>

In this example the xmlutils.js is stored in the course files in a folder called 'scripts' but you can store it anywhere you want as long as you get the right url and enter it to the code.

Here are the javascript functions:

function loadXML(file) {
if (document.implementation && document.implementation.createDocument) {
xmlDoc = document.implementation.createDocument("", "", null);
} else {
if (window.ActiveXObject) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
} else {
alert('Your browser can\'t handle this script');
return;
}
}
xmlDoc.async=false;
xmlDoc.load(file);
return xmlDoc;
}


function displayDesc (xmlDoc) {
var items = xmlDoc.getElementsByTagName('item');
if (items.length>0) {
var itemContent="";
for (j=0;j<items[0].childNodes.length;j++) {
if (items[0].childNodes[j].nodeType!=1) continue;
var itemName=items[0].childNodes[j].nodeName;
if (itemName=='description') {
itemContent=items[0].childNodes[j].firstChild.nodeValue;
}
}
}
return itemContent;
}

The display function here is simplified so as to be clearer. Thus it will always take the first item in the RSS file which is supposed to be the last added entry. But that also means that you can't add the next warm-up too early because it will immediately show up on the main page. Of course the code may be more flexible and select the item for display according to week or some other method. This can be added later on if you decide to use this approach and you find you need a different display method.

So, this is it. If you need more details just let me know. sonrisa

Hi Ben,

I'm using a simple javascript to propagate database content to the course main page (in e.g. HTML block, label resource etc.) This may allow you to display the most recent warm-up slide (or any other for that matter) on the main page so that no one could miss it. Let me know if you're interested and I'll post the script.

Itamar sonrisa