ATutor

Learning Management Tools







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


Ala carte installation of 163


  • 2009-07-23 10:41:18

    Ala carte installation of 163

    Hello. Is there any way to install certain components of 1.6.3 (like LaTeX support or Social Networking) w/o installing the full version? I have a modified 1.6.2 version installed and I would like to avoid redoing all of the modifications, but I would like to be relatively current with my ATutor version.

    Basically is there a way to ala carte install parts of 1.6.3?

    Thanks.

  • 2009-07-23 10:53:32

    Re: Ala carte installation of 1.6.3?

    Remove the following code in the include/lib/output.inc.php file in 1.6.2.

    [php]

    if (isset($_config_defaults['latex_server']) && $_config_defaults['latex_server']) {
    // see: http://www.forkosh.com/mimetex.html
    $input = preg_replace('/\[tex\](.*?)\[\/tex\]/sie', "'<img src=\"'.\$_config_defaults['latex_server'].rawurlencode('$1').'\" align=\"middle\">'", $input);
    }


    [/php]

    and add this code near the end of AT_print() function in the same file

    [php]
    if (isset($_config['latex_server']) && $_config['latex_server']) {

    $input = preg_replace('/\[tex\](.*?)\[\/tex\]/sie', "'<img src=\"'.\$_config['latex_server'].rawurlencode('$1').'\" align=\"middle\">'", $input);
    }
    [/php]

    Then add a new item to the config table, column 1 "latex_server" and column 2 "http://www.atutor.ca/cgi/mimetex.cgi?"

  • 2009-07-23 10:55:39

    Re: Ala carte installation of 1.6.3?

    Otherwise no ala carte, apart from installing the 1.6.2 social networking module, now integrated with 1.6.3.

  • 2009-07-29 10:37:13

    Re: Ala carte installation of 1.6.3?

    Greg,

    I think there's something wrong with the syntax above. There seems to be a quotation that's unclosed, but I can't find it in the code you gave. I use Notepad ++ and everything after

    '", $input);
    }

    is grayed out which means php is treating it like html.

    BTW, I placed your code as the last "if statement" within the AT_print function before return $input;

    Thanks.

  • 2009-07-29 10:53:27

    Re: Ala carte installation of 1.6.3?

    For some reason the escape quote for second quote in align="middle" is not appearing in the forum message. It is there in the source of the message though.

    Try grabbing a copy of the code from the repository.
    http://atutorsvn.atrc.utoronto.ca/repos/atutor/trunk/docs/include/lib/output.inc.php

    Or adding in a slash before the quote after the value "middle"

  • 2009-07-29 11:27:31

    Re: Ala carte installation of 1.6.3?

    Still failing......

    I've attached the output.inc file I'm working with.

    In the config table, I added "latex_server" for "name" and "http://www.atutor.ca/cgi/mimetex.cgi?" for "value".

  • 2009-07-29 11:36:47

    Re: Ala carte installation of 1.6.3?

    It missing the escape on the quote before "align".

    Try just copying the whole file from the repository.