function template_preprocess_quail_api_problem in Quail API 7
Same name and namespace in other branches
- 8 quail_api.module \template_preprocess_quail_api_problem()
Template preprocess function for quail_api_problem.tpl.php.
File
- ./
quail_api.module, line 151 - Module file for the quail api.
Code
function template_preprocess_quail_api_problem(&$variables) {
drupal_add_css(drupal_get_path('module', 'quail_api') . '/includes/quail_api.css');
$root_class_name = 'quail_api-problem';
$variables['base_class'] = $root_class_name;
$variables['specific_class'] = '';
$variables['problem_line'] = '';
$variables['problem_description'] = '';
if (isset($variables['problem_id'])) {
$variables['specific_class'] = $root_class_name . '-' . drupal_strtolower(check_plain($variables['problem_id']));
}
if (isset($variables['problem_data']['line'])) {
$variables['problem_line'] = check_plain($variables['problem_data']['line']);
}
if (isset($variables['problem_data']['element'])) {
$variables['problem_description'] = check_markup($variables['problem_data']['element'], $variables['markup_format']);
}
unset($variables['problem_id']);
unset($variables['problem_data']);
}