ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Questions The option leave blank


  • 2007-12-18 22:52:08

    Questions The option leave blank

    Subject: A few changes to Exams and Surveys section Quote this post in your reply
    operating system - Server 2003
    version of ATutor - 1.5.5
    versions of php - 5.2.3
    version of mysq l - 5.0
    webserver & version - Apache 2.2.6
    web browser being used - firefox and I.E.

    When I make new exams the multiple choice questions and the true or false questions always have the option to leave them blank... The problem is that here in Puerto Rico, the dpt. of education is on a debate on whether it's fair or not the use of that type of option in exams, because it leads to confusion. Now I was asked to remove all the "none of the above" and "leave blank" options in the exams, but I haven't yet found where this option is programmed in the php files regarding to the exams.

    Does anyone know?

  • 2007-12-19 04:31:07

    Re: Questions & The option leave blank

    we have also discussed this matter several times, but haven't really found a solution.

    the problem is (as far as I know) that radio buttons [b]have to[/b] have one option selected by default, so you are left with a few options:

    1. have a standard choice (like "leave empty") chosen by default
    2. choose a random (or the first) option as default - not a good solution!
    3. use "multiple answer" questions as multiple choice. these use checkboxes, not radioboxes.
    4. do not use radio boxes in Atutor at all, only checkboxes.

    all of these options has different issues I'm afraid.

  • 2007-12-19 06:57:10

    Re: Questions & The option leave blank

    This has been discussed, though for an earlier version: http://www.atutor.ca/view/7/6092/1.html .
    This modification uses the first choice as the default (#2 in Vegard's list).

    Basically the approach in the current version remains the same, but now there are more question types and the functionality is split into many files -- all of the themes/default/test_questions/.

    If you need it before your programmer gets back, I will go into detail so that you could implement this feature yourself.

  • 2007-12-19 11:20:12

    Re: Questions & The option leave blank

    I would appreciate it if you can help me out :). I will try and see the files myself, check if I can do something . And again, thank you!

  • 2007-12-24 03:57:16

    Re: Questions & The option leave blank

    Here you are. The attached is a diff for 1.5.5.

    This patch hides the "Leave blank" option in the three test question types that support it.
    All the files changed reside in /themes/default/test_questions/ directory.

    You can apply the patch with either "patch" utility in Linux or manually.
    The latter shouldn't be a problem even if you're unfamiliar with the diff format, as it's quite intuitive.
    But don't forget to back up the existing files -- just in case something goes wrong.

  • 2007-12-24 10:37:43

    Re: Questions & The option leave blank

    Wow, Indie... thank you, I will do this asap and post how it went. Again, thank your for your help, you just made my Christmas. I've been working on cosmetic changes the last few days, I will see if I can implement this tomorrow or after tomorrow the 26th, because I have remote access to my computers but they shut them down for Christmas :/. I dunno why. Again thank you.

    To all those who read this, merry Christmas or holidays, hope you all have a good end of year.

  • 2008-01-05 17:56:41

    Re: Questions & The option leave blank

    +update+

    I applied the patch on my test machine and it worked almost perfectly :), the only problem I'm seeing (dunno if I did something wrong, I'm backtracking through everything I did) is that the last question of every multiple choice appears with a + sign besides it... which can lead to confusion since many will believe we are giving away the answer :p.

    I will post if I can fix it.

  • 2008-01-05 18:03:17

    Re: Questions & The option leave blank

    *update*

    I manually patched it and apparently made an error in the multichoice.tmpl.

    I left [php]- <li style="padding: 4px">
    - <input type="radio" name="answers[<?php echo $this->row['question_id']; ?>]" value="-1" id="choice_<?php echo $this->row['question_id']; ?>'_x" checked="checked" /><label for="choice_<?php echo $this->row['question_id']; ?>'_x"><em><?php echo _AT('leave_blank'); ?></em></label>
    - </li>
    -</ul> [/php]

    Instead of the fixed one. Indie thank you very much for this patch.

  • 2008-01-05 20:07:55

    Re: Questions & The option leave blank

    Indie I didn't notice until now, in your patch on line 103 (on my editor at least) you left out:

    [php]<p><?php echo AT_print($this->row['question'], 'tests_questions.question'); ?></p>[/php]

    Without that line the multiple choice questions will not show.

    In the attached file I show you what I mean... See Pregunta 8 (question 8).

  • 2008-01-06 03:25:32

    Re: Questions & The option leave blank

    Unfortunately, I cannot see the second attached image: you probably left it private when uploading.

    I've just applied the patch again and it seems to work fine. My guess is that you might have misinterpreted some part of the diff, since it doesn't delete a line similar to the one you mention.

    I'd suggest you revert the files to the state before you patched them, and we'll repeat everything, this time automatically. You did make a backup, right?

    After restoring the original files, you should do the following:
    1. Place the no_leave_blank.diff in dir /themes/default/test_questions/ .
    2. In the Linux shell (or SSH, whatever) go to that dir and execute a command "patch -p1 < no_leave_blank.diff".
    If everything runs OK, it should output:
    "patching file likert_stats.tmpl.php
    patching file likert.tmpl.php
    patching file multichoice_stats.tmpl.php
    patching file multichoice.tmpl.php
    patching file truefalse_stats.tmpl.php
    patching file truefalse.tmpl.php"

  • 2008-01-06 13:03:32

    Re: Questions & The option leave blank

    I already got the questions to show by adding the line I posted. I will anyway patch it following your instructions in my test computer, to learn how to use the .diff extension :).

    I posted the new screenshot and posted it on public, forgot to do that last time, like you said.

  • 2008-01-14 04:48:18

    Re: Questions & The option leave blank

    So have you tested it? Does it work?

  • 2008-02-04 11:55:07

    Re: Questions & The option leave blank

    So far everything is working fine, I didn't reply earlier because I wanted to test it for a few weeks before saying anything. So yep, it's been working so far without any errors ;). Again Indie thanks for your help.

  • 2008-02-05 05:30:36

    Re: Questions & The option leave blank

    You're welcome.
    Glad to hear it suits you.

  • 2009-07-22 05:48:45

    Re: Questions & The option leave blank

    If you are asking for help, provide lots of detail so problems can be reproduced.

    Things to describe:
    ATutor Version:
    1.6.2. Check Latest Version.
    PHP Version:
    4.4.4
    MySQL Version:
    5.0.27
    OS:
    FreeBSD 6.3-RELEASE
    ...and anything else relevant -

    [reply][b]In reply to:[/b]
    Hi Indie,

    Please help, I am having the same issue. I can't remove the 'leave blank' option.

    Thanks
    [op]forums/view.php?fid=7;pid=12303;page=1#12728[/op][/reply]

  • 2009-07-27 04:22:42

    Re: Questions & The option leave blank

    Hi,

    The diff attached to this thread on 2007-12-24 is inaccessible now, so I'm reposting it.
    It's for 1.5.5, but the approach is simple and I guess you'll be able to make it work for the version you're using.

  • 2009-11-19 01:25:07

    The option leave blank in MCQs

    Hello, I have checked the forum for these. I saw some responses, however, all of them are for version 1.5. I still try to follow them but when I open the take_take.php, there was less than 250 lines of code and the instructions said to comment lines 308-309.

    The second response was this:
    2) Next comment out the code that displays the option for "Leave Blank" from the Multiple Choice, True False and Likert sections

    case AT_TESTS_MC:
    ...
    //echo $spacer;
    //echo '<input type="radio" name="answers['.$row['question_id'].']" value="-1" id="choice_'.$row['question_id'].'_x" checked="checked" /><label for="choice_'.$row['question_id'].'_x"><em>'._AT('leave_blank').'</em></label>';

    ======================================

    I cant see anything like this in take_test.php

    Please help. I need to carry out an important examination in which I cannot have these leave blank options.

    Thank you.

  • 2009-11-19 05:01:34

    Re: The option leave blank in MCQs

    Hello, you can download the DIFF file attached to my previous post and adapt those changes for your installation. For MC questions, you'll need to look only at lines 56...121.

    The DIFF file format lists lines that have to be removed and those that have to be added, and it's quite intuitive. See an example at http://en.wikipedia.org/wiki/Diff#Unified_format