';
$str .= '';
if (!empty($ilm_parent->url))
$url_ilm = display_url_ilm($ilm_parent->url);
else
$url_ilm = $ilm_parent->url;
if ($ilm_parent->file_jar == $ilm_parent->id) {
$ilm_parent->file_jar = "";
}
$str .= '' . chr(13);
$str .= '' . get_string('version_ilm', 'iassign') . ': ' . $ilm_parent->version . ' | ' . chr(13);
$str .= '';
$str .= $link_default . ' ';
$str .= $link_edit . ' ';
$str .= $link_copy . ' ';
$str .= $link_visible . ' ';
$str .= $link_view . ' ';
$str .= $link_export . ' ';
$str .= $link_delete;
$str .= ' | ' . chr(13) . ' ' . chr(13);
// ./mod/iassign/locallib.php : function get_description_lang(...)
//D print_r($ilm_parent->description); echo " "; exit(); // {"en":"Visual Interactive Programming on the Internet HTML5","pt_br":"Programação visual interativa na Internet"}
//D ilm_parent->description = {"en":{"text":"iVProgH: interactive Visual ProgrammingA free educational tool of LInE - IME - USP.","format":"1"}, "pt_br":"Programa\u00e7\u00e3o visual interativa na Internet"}
$str .= '' . chr(13);
$current_language = current_language();
// locallib.php: class iassign_language : get text from JSON {"en":"...","pt":"..."}
$str_description = "";
if ($ilm_parent) {
$current_language = current_language();
$description_obj = iassign_language::get_description_lang($current_language, $ilm_parent->description); // gets a pure text description
if (is_object($description_obj)) // just in case (if some changes in Moodle/PHP 'json_decode(...)' function...
$str_description = $description_obj->text;
else
$str_description = $description_obj;
}
$str .= '' . get_string('description', 'iassign') . ': ' .
$str_description . ' | '; // iassign_language::get_description_lang($current_language, $ilm_parent->description)
$str .= '' . get_string('activities', 'iassign') . ': ' . $total . ' | ' . chr(13);
$str .= ' ' . chr(13);
$langs_str = iassign_language::get_all_lang($ilm_parent->description);
$str .= '';
if ($langs_str != "")
$str .= '' . get_string('language_label', 'iassign') . ': ' . $langs_str . ' | ';
$str .= '' . get_string('type_ilm', 'iassign') . ': ' . $ilm_parent->type . ' | ';
$str .= ' ';
if (strtolower($ilm_parent->type) == 'java') {
$ilm_parent->file_jar = basename($ilm_parent->file_jar);
}
$str .= '' . get_string('url_ilm', 'iassign') . ' ' . $url_ilm . ' | ';
$str .= '' . get_string('file_jar', 'iassign') . ': ' . $ilm_parent->file_jar . ' | ';
$str .= '' . get_string('file_class', 'iassign') . ': ' . $ilm_parent->file_class . ' | ';
$str .= '' . get_string('extension', 'iassign') . ': ' . $ilm_parent->extension . ' | ';
$str .= '' . get_string('width', 'iassign') . ': ' . $ilm_parent->width;
$str .= ' ' . get_string('height', 'iassign') . ': ' . $ilm_parent->height . ' | ';
if ($ilm_parent->evaluate == 1)
$evaluate = get_string('yes', 'iassign');
else
$evaluate = get_string('no', 'iassign');
$str .= '' . get_string('evaluate', 'iassign') . ': ' . $evaluate . ' | ';
if ($ilm_parent->enable == 1 || $ilm_parent->enable == -1)
$enable = get_string('yes', 'iassign');
else
$enable = get_string('no', 'iassign');
$str .= '' . get_string('enable', 'iassign') . ': ' . $enable . ' | ';
$str .= '' . chr(13);
$str .= '' . get_string('file_created', 'iassign') . ': ' . userdate($ilm_parent->timecreated) . ' | ';
$str .= '' . get_string('file_modified', 'iassign') . ': ' . userdate($ilm_parent->timemodified) . ' | ' . chr(13);
$str .= ' ' . chr(13);
$user_ilm = $DB->get_record('user', array('id' => $ilm_parent->author));
if ($user_ilm) {
$str .= '' . chr(13);
$str .= '' . get_string('author', 'iassign') . ': ' . $user_ilm->firstname . ' ' . $user_ilm->lastname . ' | ';
$str .= ' ' . chr(13);
}
$str .= '' . chr(13);
$str .= '';
$url_add_param = new moodle_url('/mod/iassign/settings_params.php', array('action' => 'add', 'ilm_id' => $ilm_id));
$action_add_param = new popup_action('click', $url_add_param, 'popup', array('width' => 900, 'height' => 650));
$link_add_param = $OUTPUT->action_link($url_add_param, iassign_icons::insert('add_param'), $action_add_param);
$str .= '' . chr(13);
$str .= '' . chr(13);
$str .= '' . get_string('config_param', 'iassign') . $OUTPUT->help_icon('config_param', 'iassign') . ' | ';
$str .= '' . $link_add_param . ' | ';
$str .= ' ' . chr(13);
$str .= '' . chr(13);
$str .= '' . get_string('config_param_name', 'iassign') . ' | ';
$str .= '' . get_string('config_param_value', 'iassign') . ' | ';
$str .= '' . get_string('config_param_description', 'iassign') . ' | ';
$str .= '' . get_string('config_param_actions', 'iassign') . ' | ';
$str .= ' ' . chr(13);
$iassign_ilm_config = $DB->get_records('iassign_ilm_config', array('iassign_ilmid' => $ilm_parent->id));
foreach ($iassign_ilm_config as $ilm_config) {
$url_edit_param = new moodle_url('/mod/iassign/settings_params.php', array('action' => 'edit', 'ilm_param_id' => $ilm_config->id));
$action_edit_param = new popup_action('click', $url_edit_param, 'iplookup', array('title' => get_string('edit_param', 'iassign'), 'width' => 900, 'height' => 650));
$link_edit_param = $OUTPUT->action_link($url_edit_param, iassign_icons::insert('edit_param'), $action_edit_param);
$url_visible_param = new moodle_url('/admin/settings.php', array('section' => 'modsettingiassign', 'action' => 'visible_param', 'ilm_id' => $ilm_parent->id, 'status' => $ilm_config->visible, 'ilm_param_id' => $ilm_config->id));
if ($ilm_config->visible == 0) {
$link_visible_param = $OUTPUT->action_link($url_visible_param, iassign_icons::insert('show_param'));
}
elseif ($ilm_config->visible == 1) {
$link_visible_param = $OUTPUT->action_link($url_visible_param, iassign_icons::insert('hide_param'));
}
$url_copy_param = new moodle_url('/mod/iassign/settings_params.php', array('action' => 'copy', 'ilm_param_id' => $ilm_config->id));
$action_copy_param = new popup_action('click', $url_copy_param, 'iplookup', array('title' => get_string('copy_param', 'iassign'), 'width' => 900, 'height' => 650));
$link_copy_param = $OUTPUT->action_link($url_copy_param, iassign_icons::insert('copy_param'), $action_copy_param);
$url_delete_param = new moodle_url('/mod/iassign/settings_params.php', array('action' => 'delete', 'ilm_param_id' => $ilm_config->id, 'ilm_id' => $ilm_parent->id));
$link_delete_param = $OUTPUT->action_link($url_delete_param, iassign_icons::insert('delete_param'));
$str .= '' . chr(13);
$str .= '' . $ilm_config->param_name . ' | ';
$str .= '' . $ilm_config->param_value . ' | ';
$str .= '' . $ilm_config->description . ' | ';
$str .= '';
$str .= $link_edit_param . ' ';
$str .= $link_copy_param . ' ';
$str .= $link_visible_param . ' ';
$str .= $link_delete_param;
$str .= ' | ';
$str .= ' ' . chr(13);
}
$str .= ' ' . chr(13);
$str .= ' | ';
$str .= ' ' . chr(13);
$str .= ' ';
$str .= ' |
';
$str .= '