ATutor

Learning Management Tools







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


ATutor misinterpreting array ref as ltem


  • 2007-03-28 23:54:03

    ATutor misinterpreting array ref as ltem

    version of ATutor - 1.5.3.3
    web browser being used - Firefox, IE


    I need to include programming code in my ATutor courses but am having a problem with ATutor recognizing array references such as old[i] as old<em> when using ATutor's code tag [code] or simply replacing the [i] with <em> and emphazing the text when enclosing the code with the <code> tag. Why is this happening and is there a way to work around it or better yet, fix it?

    Thanks,

    Sandie

  • 2007-03-29 08:52:17

    Re: ATutor misinterpreting array ref as <em>

    Can you be more specific. What do you mean by "recognizing array references"

  • 2007-03-29 13:26:55

    Re: ATutor misinterpreting array ref as <em>

    I will try explaining by using HTML special characters this time to represent the brackets since even this forum is interpreting it the same way and my brackets disappeared in my initial message...

    I mean, I am trying to reference an array element such as old[i] but ATutor interprets the "left bracket" i "right bracket" as an <em> tag.

    You can look at a test file that explains it in one my courses at http://ci-tutor.ncsa.uiuc.edu/ . From the home page click on the "Browse Courses" tab, then select "Introduction to MPI". Once in the course, look at the "Test File" Section under Chapter 2 "Getting Started with MPI"

    I have a lot of code in this course and really don't want to have to replace the brackets with the HTML special characters :(.

  • 2007-03-29 14:22:12

    Re: ATutor misinterpreting array ref as <em>

    I see the problem.

    [ i ] is used for italics and [ em ]. To fix that you would have to edit /include/lib/output.inc.php and comment out lines 504-55:
    [php] $text = str_replace('[ i ]','<em>',$text);
    $text = str_replace('[/ i ]','</em>',$text);[/php]

  • 2007-03-29 14:28:05

    Re: ATutor misinterpreting array ref as <em>

    I thought it could be fixed in the code somewhere but had no idea where.

    Thanks for your help!