ATutor

Learning Management Tools







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


Tests with images Is it possible


  • 2005-09-15 14:11:45

    Tests with images Is it possible

    operating system - windows XP
    version of ATutor - 1.5.1 pl1
    versions of php - EasyPHP 1.8.0.0

    Dear colleges!
    Is it possible to include image into the question of the test.
    After inserting a picture in the editor mode, I see just a HTML text - something like <IMG src="http://127.0.0.1/ATutor/get.php/test2/activity.gif"> but not the image.
    Thank you for any comments.

  • 2005-09-20 13:43:11

    Possible but broken

    Something seems to have broken, but yes it is (should be) possible to insert images. We will post the patch here as soon as possible.

  • 2005-09-20 14:11:18

    MC images

    FIX for images not showing up for multiple-choice question choices as follows:
    --------
    inc/lib/constants.inc.php, after line 284, add
    $_field_formatting['tests_questions.*'] = AT_FORMAT_ALL;

    ---------
    tests/preview.php, line 135
    tests/preview_question.php, line 59
    tools/take_test, line 224

    all of these, replace
    AT_print($row['choice_'.$i], 'tests_answers.answer')
    with
    AT_print($row['choice_'.$i], 'tests_questions.choice_'.$i)

    -------------
    tools/view_results.php and tools/tests/view_results.php
    add these lines before the require(AT_INCLUDE_PATH.'header.inc.php'); line

    if (defined('AT_FORCE_GET_FILE') && AT_FORCE_GET_FILE) {
    $content_base_href = 'get.php/';
    } else {
    $course_base_href = 'content/' . $_SESSION['course_id'] . '/';
    }

    AND edit these two vars so that $_base_path is now in there, like so:
    $mark_right = '<img src="'.$_base_path.'images/checkmark.gif" alt="'._AT('correct_answer').'" />';
    $mark_wrong = '<img src="'.$_base_path.'images/x.gif" alt="'._AT('wrong_answer').'" />';


    i think that's all. let us know how it works out.