hide thematic advance option from course description tool - partial BT#578

skala
Cristian Fasanando 15 years ago
parent e36a51f946
commit 155aa7362c
  1. 6
      main/course_description/add.php
  2. 2
      main/course_description/course_description_controller.php
  3. 12
      main/course_description/edit.php
  4. 8
      main/course_description/index.php
  5. 12
      main/course_description/listing.php
  6. 14
      main/inc/lib/course_description.lib.php
  7. 14
      user_portal.php

@ -10,6 +10,8 @@
// protect a course script
api_protect_course_script(true);
var_dump($_SESSION['studentview']);
// display categories
$categories = array ();
foreach ($default_description_titles as $id => $title) {
@ -43,7 +45,9 @@ if ($description_type >= ADD_BLOCK) {
$header = $default_description_titles[ADD_BLOCK];
}
$token = Security::get_token();
if (!$error) {
$token = Security::get_token();
}
// display form
$form = new FormValidator('course_description','POST','index.php?action=add&'.api_get_cidreq(),'','style="width: 100%;"');
$form->addElement('header', '', $header);

@ -67,7 +67,7 @@ class CourseDescriptionController { // extends Controller {
$session_id = api_get_session_id();
$course_description->set_session_id($session_id);
$data = array();
if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") {
if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") {
if (!empty($_POST['title']) && !empty($_POST['contentDescription'])) {
$check = Security::check_token();

@ -10,8 +10,9 @@
// protect a course script
api_protect_course_script(true);
$token = Security::get_token();
if (!$error) {
$token = Security::get_token();
}
// display categories
$categories = array ();
foreach ($default_description_titles as $id => $title) {
@ -48,13 +49,16 @@ if ($description_type >= ADD_BLOCK) {
// display form
$form = new FormValidator('course_description','POST','index.php?action=edit&description_type='.$description_type.'&'.api_get_cidreq(),'','style="width: 100%;"');
/*
if ($description_type == THEMATIC_ADVANCE) {
$form->addElement('html','<div class="row">
<div class="form_header"><table width="100%"><tr><td>'.get_lang('ThematicAdvance').'</td><td align="right"><a href="index.php?action=history&description_type='.$description_type.'">'.Display::return_icon('lp_dir.png',get_lang('ThematicAdvanceHistory'),array('style'=>'vertical-align:middle;hspace:6')).' '.get_lang('ThematicAdvanceHistory').'</a></td></tr></table></div>
</div>');
} else {
$form->addElement('header','',$header);
}
}*/
$form->addElement('header','',$header);
$form->addElement('hidden', 'description_type',$description_type);
$form->addElement('hidden', 'sec_token',$token);
@ -67,11 +71,13 @@ if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
}
/*
if ($description_type == THEMATIC_ADVANCE) {
$options_select = array(0,10=>10,20=>20,30=>30,40=>40,50=>50,60=>60,70=>70,80=>80,90=>90,100=>100);
$form->addElement ('select', 'progress',get_lang('Progress'),$options_select);
$default['progress'] = intval($progress);
}
*/
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');

@ -20,8 +20,8 @@ require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'WCAG/WCAG_rendering.php';
// defining constants
define('ADD_BLOCK', 9);
define('THEMATIC_ADVANCE', 8);
define('ADD_BLOCK', 8);
//define('THEMATIC_ADVANCE', 8);
// current section
$this_section = SECTION_COURSES;
@ -41,6 +41,10 @@ if (isset($_GET['description_type'])) {
$description_type = intval($_GET['description_type']);
}
if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
$action = 'listing';
}
// interbreadcrumb
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('CourseProgram'));
if(intval($description_type) == 1) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('GeneralDescription'));

@ -62,26 +62,32 @@ if (isset($descriptions) && count($descriptions) > 0) {
echo Display::return_icon('edit.gif', get_lang('Edit'), array('style' => 'vertical-align:middle;float:right; padding-right:4px;'));
echo '</a> ';
/*
if ($description['description_type'] == THEMATIC_ADVANCE) {
// thematic advance history link
echo '<a href="index.php?action=history&description_type='.$description['description_type'].'">';
echo Display::return_icon('lp_dir.png',get_lang('ThematicAdvanceHistory'),array('style'=>'vertical-align:middle;float:right;padding-right:4px;'));
echo '</a> ';
}
*/
}
$progress = (isset($description['progress'])?$description['progress'].'%':'');
/*
$progress = (isset($description['progress'])?$description['progress'].'%':'');
if ($description['description_type'] == THEMATIC_ADVANCE) {
echo '<a name="thematic_advance"></a>';
echo get_lang('ThematicAdvance').' : '.$description['title'].' - '.$progress;
} else {
echo $description['title'];
}
} */
echo $description['title'];
/*
if ($history) {
echo ' - '.$progress.' ('.$description['lastedit_date'].') ';
}
*/
echo '</div>';
echo '<div class="sectioncomment">';

@ -255,8 +255,8 @@ class CourseDescription
$default_description_titles[5]= get_lang('CourseMaterial');
$default_description_titles[6]= get_lang('HumanAndTechnicalResources');
$default_description_titles[7]= get_lang('Assessment');
$default_description_titles[8]= get_lang('ThematicAdvance');
$default_description_titles[9]= get_lang('Other');
//$default_description_titles[8]= get_lang('ThematicAdvance');
$default_description_titles[8]= get_lang('Other');
return $default_description_titles;
}
@ -273,7 +273,7 @@ class CourseDescription
$default_description_title_editable[5] = true;
$default_description_title_editable[6] = true;
$default_description_title_editable[7] = true;
$default_description_title_editable[8] = true;
//$default_description_title_editable[8] = true;
return $default_description_title_editable;
}
@ -290,8 +290,8 @@ class CourseDescription
$default_description_icon[5]= 'laptop.gif';
$default_description_icon[6]= 'personal.gif';
$default_description_icon[7]= 'korganizer.gif';
$default_description_icon[8]= 'porcent.png';
$default_description_icon[9]= 'ktip.gif';
//$default_description_icon[8]= 'porcent.png';
$default_description_icon[8]= 'ktip.gif';
return $default_description_icon;
}
@ -308,7 +308,7 @@ class CourseDescription
$question[5]= get_lang('CourseMaterialQuestions');
$question[6]= get_lang('HumanAndTechnicalResourcesQuestions');
$question[7]= get_lang('AssessmentQuestions');
$question[8]= get_lang('ThematicAdvanceQuestions');
//$question[8]= get_lang('ThematicAdvanceQuestions');
return $question;
}
@ -325,7 +325,7 @@ class CourseDescription
$information[5]= get_lang('CourseMaterialInformation');
$information[6]= get_lang('HumanAndTechnicalResourcesInformation');
$information[7]= get_lang('AssessmentInformation');
$information[8]= get_lang('ThematicAdvanceInformation');
//$information[8]= get_lang('ThematicAdvanceInformation');
return $information;
}

@ -311,11 +311,13 @@ function display_special_courses ($user_id) {
$status_icon=Display::return_icon('course.gif', get_lang('Course')).' '.Display::return_icon('students.gif', get_lang('Status').': '.get_lang('Student'),array('style'=>'width:11px; height:11px'));
}
/*
if (api_is_allowed_to_edit(null, true)) {
$progress_thematic_icon = '<a href="'.api_get_path(WEB_CODE_PATH).'course_description/index.php?action=edit&cidReq='.$course['code'].'&description_type=8'.'">'.get_thematic_progress_icon($course['db_name']).'</a>';
} else {
$progress_thematic_icon = get_thematic_progress_icon($course['db_name']);
}
*/
echo "\t<tr>\n";
echo "\t\t<td>\n";
@ -330,7 +332,7 @@ function display_special_courses ($user_id) {
$course_title = $course['title']." ".get_lang('CourseClosed');
}
echo "<div style=\"float:left;margin-right:10px;\">".$status_icon."</div><span style=\"font-size:135%;\">".$course_title."</span>&nbsp;&nbsp;<span>$progress_thematic_icon</span><br />";
echo "<div style=\"float:left;margin-right:10px;\">".$status_icon."</div><span style=\"font-size:135%;\">".$course_title."</span><br />";
if (api_get_setting('display_coursecode_in_courselist') == 'true') {
echo $course['visual_code'];
}
@ -452,12 +454,14 @@ function display_courses_in_category($user_category_id) {
if (($course['status'] == STUDENT && !api_is_coach()) || empty($course['status'])) {
$status_icon=Display::return_icon('course.gif', get_lang('Course')).' '.Display::return_icon('students.gif', get_lang('Status').': '.get_lang('Student'),array('style'=>'width:11px; height:11px'));
}
/*
if (api_is_allowed_to_edit(null,true)) {
$progress_thematic_icon = '<a href="'.api_get_path(WEB_CODE_PATH).'course_description/index.php?action=edit&cidReq='.$course['code'].'&description_type=8'.'">'.get_thematic_progress_icon($course['db_name']).'</a>';
} else {
$progress_thematic_icon = get_thematic_progress_icon($course['db_name']);
}
*/
echo "\t<tr>\n";
echo "\t\t<td>\n";
@ -495,7 +499,7 @@ function display_courses_in_category($user_category_id) {
}
echo "<div style=\"float:left;margin-right:10px;\">".$status_icon."</div><span style=\"font-size:135%;\">".$course_title."</span>&nbsp;&nbsp;<span>$progress_thematic_icon </span><br />";
echo "<div style=\"float:left;margin-right:10px;\">".$status_icon."</div><span style=\"font-size:135%;\">".$course_title."</span><br />";
if (api_get_setting('display_coursecode_in_courselist') == 'true') {
echo $course_display_code;
}
@ -788,13 +792,15 @@ function get_logged_user_course_html($course, $session_id = 0, $class='courses')
$result .= $course_display_title." "." ".get_lang('CourseClosed')."";
}
/*
if (api_is_allowed_to_edit(null, true)) {
$progress_thematic_icon = '<a href="'.api_get_path(WEB_CODE_PATH).'course_description/index.php?action=edit&cidReq='.$course['code'].'&description_type=8'.'">'.get_thematic_progress_icon($course_database, $session_id).'</a>';
} else {
$progress_thematic_icon = get_thematic_progress_icon($course_database, $session_id);
}
*/
$result .= '&nbsp;&nbsp;<span>'.$progress_thematic_icon.'</span>';
//$result .= '&nbsp;&nbsp;<span>'.$progress_thematic_icon.'</span>';
// show the course_code and teacher if chosen to display this
if (api_get_setting('display_coursecode_in_courselist') == 'true' || api_get_setting('display_teacher_in_courselist') == 'true') {
$result .= '<br />';

Loading…
Cancel
Save