1、编辑时的追踪点:\claroline\exercise\admin\edit_question.php文件290-330行:
点击(此处)折叠或打开
- if( is_null($quId) )
- {
- $out .= '
' . "\n" ' . "\n\n"- . '
'.get_lang('Answer type').' : ' . "\n"- . '
' . "\n" ' . "\n"- . '
- . ( $form['type'] == 'MCUA'?' checked="checked"':' ') . ' />'
- . ' .get_lang('Multiple choice (Unique answer)').''
- . '
' . "\n"- . '
- . ( $form['type'] == 'MCMA'?' checked="checked"':' ') . ' />'
- . ' .get_lang('Multiple choice (Multiple answers)').''
- . '
' . "\n"- . '
- . ( $form['type'] == 'TF'?' checked="checked"':' ') . ' />'
- . ' .get_lang('True/False').''
- . '
' . "\n"- . '
- . ( $form['type'] == 'FIB'?' checked="checked"':' ') . ' />'
- . ' .get_lang('Fill in blanks').''
- . '
' . "\n"- . '
- . ( $form['type'] == 'MATCHING'?' checked="checked"':' ') . ' />'
- . ' .get_lang('Matching').''
- . "\n"
- . '
- . '
- . '
- ;
- }
- else
- {
- $out .= '
' . "\n" ' . "\n\n";- . '
'.get_lang('Answer type').' : ' . "\n"- . '
'; ' . "\n"- if( isset($localizedQuestionType[$form['type']]) ) $out .= $localizedQuestionType[$form['type']];
- $out .= '
- . '
- . '
- }
点击(此处)折叠或打开
- if( $askDuplicate )
- {
- $out .= '
' . "\n" ' . "\n\n";- . '
- . '
' ' . "\n"- . html_ask_duplicate()
- . '
- . '
- . '
- }
点击(此处)折叠或打开
- $out .= $question->getQuestionAnswerHtml();
点击(此处)折叠或打开
- . '
'
. get_lang('Fill in blanks') . '' . "\n";
但是这样必须每种答案类型的文件都修改,在exercise\lib下的以answer开头的文件,都需要修改,比较麻烦。
思路二:直接添加一个类型说明,在上文件最后有
点击(此处)折叠或打开
- $out .= $question->getQuestionAnswerHtml();
点击(此处)折叠或打开
- $out .= "
"
. $localizedQuestionType[$question->getType()] ."";
思路三:做练习时上方添加类型提醒:exercise_submit.php的778行
点击(此处)折叠或打开
- else
- {
- $out .= '
' . "\n" ' . "\n\n";- . '
' ' . "\n"- . get_lang('Question') . ' ' . $questionIterator
- . ' / '.$questionCount
- . '
- . '
- . '
点击(此处)折叠或打开
- $type_text=array('MCUA'=>get_lang('Multiple choice (Unique answer)'),
- 'MCMA'=>get_lang('Multiple choice (Multiple answers)'),
- 'TF'=>get_lang('True/False'),
- 'FIB'=>get_lang('Fill in blanks'),
- 'MATCHING'=>get_lang('Matching')
- );
- $out .= '
' . $type_text[$question->getType()]. '