[svn r14101] add no manager item when creating/editing a course (FS#2159)

skala
Eric Marguin 17 years ago
parent d746b83360
commit 8046050d9a
  1. 3
      main/admin/course_add.php
  2. 4
      main/admin/course_edit.php
  3. 3
      main/course_info/infocours.php
  4. 8
      main/inc/lib/add_course.lib.inc.php

@ -1,5 +1,5 @@
<?php
// $Id: course_add.php 13972 2007-12-06 10:32:41Z elixir_inter $
// $Id: course_add.php 14101 2008-01-08 15:39:39Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -69,6 +69,7 @@ $table_user = Database :: get_main_table(TABLE_MAIN_USER);
$sql = "SELECT user_id,lastname,firstname FROM $table_user WHERE status=1 ORDER BY lastname,firstname";
$res = api_sql_query($sql,__FILE__,__LINE__);
$teachers = array();
$teachers[0] = '-- '.get_lang('NoManager').' --';
while($obj = mysql_fetch_object($res))
{
$teachers[$obj->user_id] = $obj->lastname.' '.$obj->firstname;

@ -1,6 +1,6 @@
<?php
// $Id: course_edit.php 13863 2007-11-29 15:47:06Z elixir_inter $
// $Id: course_edit.php 14101 2008-01-08 15:39:39Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -103,6 +103,8 @@ while($obj = mysql_fetch_object($res))
$sql = "SELECT user_id,lastname,firstname FROM $table_user WHERE status='1' ORDER BY lastname,firstname";
$res = api_sql_query($sql,__FILE__,__LINE__);
$teachers = array();
$platform_teachers[0] = '-- '.get_lang('NoManager').' --';
while($obj = mysql_fetch_object($res))
{
if(!array_key_exists($obj->user_id,$course_teachers)){

@ -1,5 +1,5 @@
<?php
// $Id: infocours.php 13790 2007-11-27 04:59:47Z yannoo $
// $Id: infocours.php 14101 2008-01-08 15:39:39Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -121,6 +121,7 @@ if(mysql_num_rows($q_result_titulars)==0){
$q_result_titulars=api_sql_query($sql, __FILE__, __LINE__);
}
$a_profs[0] = '-- '.get_lang('NoManager').' --';
while($a_titulars=mysql_fetch_array($q_result_titulars)){
$s_username=$a_titulars["username"];
$s_lastname=$a_titulars["lastname"];

@ -1980,11 +1980,6 @@ function register_course($courseSysCode, $courseScreenCode, $courseRepository, $
$error_msg[] = "language is missing";
$okForRegisterCourse = false;
}
if(empty ($uidCreator))
{
$error_msg[] = "uidCreator is missing";
$okForRegisterCourse = false;
}
if(empty ($expiration_date))
{
@ -1994,7 +1989,6 @@ function register_course($courseSysCode, $courseScreenCode, $courseRepository, $
{
$expiration_date = "FROM_UNIXTIME(".$expiration_date . ")";
}
if($okForRegisterCourse)
{
$titular=addslashes($titular);
@ -2016,7 +2010,7 @@ function register_course($courseSysCode, $courseScreenCode, $courseRepository, $
last_visit = NULL,
tutor_name = '".Database :: escape_string($titular) . "',
visual_code = '".Database :: escape_string($courseScreenCode) . "'";
api_sql_query($sql, __FILE__, __LINE__);
$sort = api_max_sort_value('0', $_user['user_id']);

Loading…
Cancel
Save