* Copyright © 2013 Strangecode, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * responses * * @author Quinn Comendant * @version 1.0 * @since 03 Nov 2013 13:29:40 */ require_once dirname(__FILE__) . '/../_config.inc.php'; /******************************************************************** * CONFIG ********************************************************************/ /******************************************************************** * MAIN ********************************************************************/ switch (getFormData('op')) { case 'parse' : echo getParsedQuestionJSON(getFormData('question_text')); break; } /******************************************************************** * OUTPUT ********************************************************************/ /******************************************************************** * FUNCTIONS ********************************************************************/ /* * * * @access public * @param * @return * @author Quinn Comendant * @version 1.0 * @since 03 Nov 2013 13:31:12 */ function getParsedQuestionJSON($question_text) { $q_parsed = Question::parseOptions($question_text); return json_encode($q_parsed); } ?>