当前位置: 首页>>代码示例>>PHP>>正文


PHP AMA_DataHandler::isError方法代码示例

本文整理汇总了PHP中AMA_DataHandler::isError方法的典型用法代码示例。如果您正苦于以下问题:PHP AMA_DataHandler::isError方法的具体用法?PHP AMA_DataHandler::isError怎么用?PHP AMA_DataHandler::isError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AMA_DataHandler的用法示例。


在下文中一共展示了AMA_DataHandler::isError方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: videoroom_info

 public function videoroom_info($id_course_instance, $tempo_avvio = NULL, $interval = NULL)
 {
     $dh = $GLOBALS['dh'];
     $error = $GLOBALS['error'];
     $debug = $GLOBALS['debug'];
     $root_dir = $GLOBALS['root_dir'];
     $http_root_dir = $GLOBALS['http_root_dir'];
     $video_roomAr = $dh->get_videoroom_info($id_course_instance, $tempo_avvio, $interval);
     if (AMA_DataHandler::isError($video_roomAr) || !is_array($video_roomAr)) {
         // FIXME: prima restituiva una stringa di testo
         $this->full = 0;
         /*
         $this->id_room = 1;
         $this->id_tutor = 7;
         $this->id = 1;
         $this->descrizione_videochat = "descrizione";
         //    	$this->tempo_avvio = $video_roomAr['tempo_avvio'];
         //    	$this->tempo_fine = $video_roomAr['tempo_fine'];
         $this->tipo_videochat = "pubblica";
         */
     } else {
         $this->id_room = $video_roomAr['id_room'];
         $this->id_tutor = $video_roomAr['id_tutor'];
         $this->id = $video_roomAr['id'];
         $this->id_istanza_corso = $video_roomAr['id_istanza_corso'];
         $this->descrizione_videochat = $video_roomAr['descrizione_videochat'];
         $this->tempo_avvio = $video_roomAr['tempo_avvio'];
         $this->tempo_fine = $video_roomAr['tempo_fine'];
         $this->tipo_videochat = $video_roomAr['tipo_videochat'];
         $this->full = 1;
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:32,代码来源:videoroom_classes_OLD.inc.php

示例2: loadSupportedLanguagesInSession

 /**
  * function loadSupportedLanguagesInSession: used to load ADA supported languages for
  * user interface messages translation into a session variable.
  *
  * @return TRUE if there arn't errors, ADA_Error object otherwise
  */
 public static function loadSupportedLanguagesInSession()
 {
     unset($_SESSION['sess_ada_supported_languages']);
     $common_dh = $GLOBALS['common_dh'];
     $supported_languages = array();
     $supported_languages = $common_dh->find_languages();
     if (AMA_DataHandler::isError($supported_languages)) {
         // FIXME: qui si verifica questo errore anche quando c'è un errore di connessione al database.
         $errObj = new ADA_Error($supported_languages, 'No languages for user interface translation were found.', 'Translator');
     }
     $_SESSION['sess_ada_supported_languages'] = $supported_languages;
     return TRUE;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:19,代码来源:translator_class.inc.php

示例3: __construct

 function __construct($id_banner = 0)
 {
     # constructor
     /*
               $user_prefHa = $this->get_user_pref();
     
               //$node_keys is a list of keywords tha can be used to select a banner
               //$node_keysAr = $this->get_node_keys();
               //$node_keys = implode(",",$node_keysAr);
     */
     $dh = $GLOBALS['dh'];
     //$layoutObj = $GLOBALS['layoutObj'];
     $out_fields_ar = array();
     $module = "";
     $keywords = "";
     $client = "";
     $bannerListAr = $dh->find_banner_list($out_fields_ar, $module, $keywords, $client);
     $id_banner = $bannerListAr[0][0];
     $bannerAr = $dh->get_banner($id_banner);
     //$path = $layoutObj->template_dir."img/banners/";
     $path = "layout/clear/img/banners/";
     // TODO: replace
     if (AMA_DataHandler::isError($bannerAr)) {
         $this->error_msg = ADA_ERR_BANNER;
         $this->html_code = "<!-- BANNER NOT FOUND-->\n<!-- END BANNER -->\n";
     } else {
         $this->id_banner = $bannerAr['id_banner'];
         $this->id_client = $bannerAr['id_client'];
         $this->http_address = $bannerAr['address'];
         $this->img = ROOT_DIR . $path . $bannerAr['image'];
         $this->impressions = $bannerAr['impressions'];
         $this->acquired_impressions = $bannerAr['a_impressions'];
         $this->from = $bannerAr['date_from'];
         $this->to = $bannerAr['date_to'];
         $this->keywords = $bannerAr['keywords'];
         $this->module = $bannerAr['module'];
         $this->id_course = $bannerAr['id_course'];
         $this->html_code = "<!-- BANNER -->\n<a href=\"" . $this->http_address . "\" target=_blank><img src=\"" . $this->img . "\" alt=\"" . $this->alt . "\"  width=\"" . $this->width . "\" height=\"" . $this->height . "\" border=\"0\"></a>\n<!-- END BANNER -->\n";
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:40,代码来源:banner.inc.php

示例4: videoroom_info

 public function videoroom_info($id_course_instance, $tempo_avvio = NULL, $interval = NULL)
 {
     $dh = $GLOBALS['dh'];
     $error = $GLOBALS['error'];
     $debug = isset($GLOBALS['debug']) ? $GLOBALS['debug'] : null;
     $root_dir = $GLOBALS['root_dir'];
     $http_root_dir = $GLOBALS['http_root_dir'];
     $video_roomAr = $dh->get_videoroom_info($id_course_instance, $tempo_avvio, $interval);
     if (AMA_DataHandler::isError($video_roomAr) || !is_array($video_roomAr)) {
         $this->full = 0;
     } else {
         $this->id_room = $video_roomAr['id_room'];
         $this->id_tutor = $video_roomAr['id_tutor'];
         $this->id = $video_roomAr['id'];
         $this->id_istanza_corso = $video_roomAr['id_istanza_corso'];
         $this->descrizione_videochat = $video_roomAr['descrizione_videochat'];
         $this->tempo_avvio = $video_roomAr['tempo_avvio'];
         $this->tempo_fine = $video_roomAr['tempo_fine'];
         $this->tipo_videochat = $video_roomAr['tipo_videochat'];
         $this->full = 1;
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:22,代码来源:videoroom.classes.inc.php

示例5: array

    } else {
        $testersAr = array();
        $tester_dataAr = array(array(translateFN('id'), $tester_infoAr[0]), array(translateFN('Nome'), $tester_infoAr[1]), array(translateFN('Ragione Sociale'), $tester_infoAr[2]), array(translateFN('Indirizzo'), $tester_infoAr[3]), array(translateFN('Citt&agrave'), $tester_infoAr[4]), array(translateFN('Provincia'), $tester_infoAr[5]), array(translateFN('Nazione'), $tester_infoAr[6]), array(translateFN('Telefono'), $tester_infoAr[7]), array(translateFN('E-mail'), $tester_infoAr[8]), array(translateFN('Descrizione'), $tester_infoAr[11]), array(translateFN('Responsabile'), $tester_infoAr[9]), array(translateFN('Puntatore al database'), $tester_infoAr[10]));
        //$tester_data = BaseHtmlLib::tableElement('',array(),$tester_dataAr);
        $tester_data = AdminModuleHtmlLib::displayTesterInfo($id_tester, $tester_dataAr);
        $services_dataAr = $common_dh->get_info_for_tester_services($id_tester);
        if (AMA_Common_DataHandler::isError($services_dataAr)) {
            $errObj = new ADA_Error($services_dataAr);
        } else {
            $tester_services = AdminModuleHtmlLib::displayServicesOnThisTester($id_tester, $services_dataAr);
        }
        $tester_dsn = MultiPort::getDSN($tester_infoAr[10]);
        if ($tester_dsn != NULL) {
            $tester_dh = AMA_DataHandler::instance($tester_dsn);
            $users_on_this_tester = $tester_dh->count_users_by_type(array(AMA_TYPE_STUDENT, AMA_TYPE_AUTHOR, AMA_TYPE_TUTOR, AMA_TYPE_SWITCHER, AMA_TYPE_ADMIN));
            if (AMA_DataHandler::isError($users_on_this_tester)) {
                $errObj = new ADA_Error($users_on_this_tester);
            } else {
                $users_list_link = CDOMElement::create('div', 'id:tester_users');
                $users_list_link->addChild(new CText(translateFN('Numero di utenti presenti sul tester: ') . $users_on_this_tester));
                $link = CDOMElement::create('a', 'href:list_users.php?id_tester=' . $id_tester);
                $link->addChild(new CText(translateFN('Lista utenti')));
                $users_list_link->addChild($link);
            }
        }
    }
} else {
    /*
     * non e' stato passato id_tester
     */
}
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:tester_profile.php

示例6: spedisci_messaggioFN

function spedisci_messaggioFN($testo, $subject, $destinatario, $mittente)
{
    $sess_id_user = $_SESSION['sess_id_user'];
    // Initialize errors array
    $errors = array();
    $mh = new MessageHandler();
    // prepare message to send
    $message_ha['destinatari'] = $destinatario;
    $message_ha['data_ora'] = "now";
    $message_ha['tipo'] = ADA_MSG_SIMPLE;
    $message_ha['mittente'] = $mittente;
    $message_ha['testo'] = $testo;
    $message_ha['titolo'] = $subject;
    $message_ha['priorita'] = 2;
    /*
        global $debug; $debug=1;
        mydebug(__LINE__,__FILE__,$message_ha);
        $debug=0;
    */
    // delegate sending to the message handler
    $res = $mh->send_message($message_ha);
    if (AMA_DataHandler::isError($res)) {
        $err_code = $res->code;
        $errore = urlencode(translateFN("Impossibile spedire il messaggio. Errore n. "));
        //header("Location: list_messages.php?status= $errore $err_code");
        exit;
    }
}
开发者ID:eguicciardi,项目名称:ada,代码行数:28,代码来源:tutor.inc.php

示例7: add_chatroomFN

 public static function add_chatroomFN($chatroom_ha, $tester_dsn = null)
 {
     $dh = $GLOBALS['dh'];
     /*
      * Check if was assigned a course instance to this chatroom. If it wasn't,
      * use course instance from request or from session.
      */
     if (!isset($chatroom_ha['id_course_instance']) || empty($chatroom_ha['id_course_instance'])) {
         //get $id_course_instance from the REQUEST variables
         if (!empty($_REQUEST['id_course_instance'])) {
             $id_course_instance = $_REQUEST['id_course_instance'];
         } elseif (!empty($_SESSION['sess_id_course_instance'])) {
             $id_course_instance = $_SESSION['sess_id_course_instance'];
         }
         $chatroom_ha['id_course_instance'] = $id_course_instance;
     }
     // get the user_id form the session variables
     $sess_id_user = $_SESSION['sess_id_user'];
     // get the course title form the GLOBAL variables
     $course_title = $GLOBALS['course_title'];
     /*
      * Check if was assigned a chat owner: if it wasn't, get this course's tutor
      * and set him as chat owner
      */
     if (!isset($chatroom_ha['id_chat_owner']) || empty($chatroom_ha['id_chat_owner'])) {
         $id_tutor = $dh->course_instance_tutor_get($chatroom_ha['id_course_instance']);
         if (!AMA_DataHandler::isError($id_tutor)) {
             $chatroom_ha['id_chat_owner'] = $id_tutor;
         }
     }
     if (!empty($chatroom_ha['chat_type'])) {
         $chatroom_ha['chat_type'] = $chatroom_ha['chat_type'];
     } else {
         $chatroom_ha['chat_type'] = CLASS_CHAT;
     }
     if (!empty($chatroom_ha['chat_title'])) {
         $chatroom_ha['chat_title'] = $chatroom_ha['chat_title'];
     } else {
         $chatroom_ha['chat_title'] = addslashes($course_title);
     }
     if (!empty($chatroom_ha['chat_topic'])) {
         $chatroom_ha['chat_topic'] = $chatroom_ha['chat_topic'];
     } else {
         $chatroom_ha['chat_topic'] = addslashes($course_title);
     }
     // MOVED TO LINE 446
     //      if (isset($chatroom_ha['id_chat_owner'])) {
     //        $chatroom_ha['id_chat_owner']=$chatroom_ha['id_chat_owner'];
     //      }
     //      else {
     //        $chatroom_ha['id_chat_owner']= $id_tutor;
     //      }
     if (!empty($chatroom_ha['start_time'])) {
         $chatroom_ha['start_time'] = $chatroom_ha['start_time'];
     } else {
         $chatroom_ha['start_time'] = time();
     }
     // check again this field
     if (isset($chatroom_ha['end_time'])) {
         $chatroom_ha['end_time'] = $chatroom_ha['end_time'];
     } else {
         $chatroom_ha['end_time'] = time() + SHUTDOWN_CHAT_TIME;
     }
     if (!empty($chatroom_ha['welcome_msg'])) {
         $chatroom_ha['welcome_msg'] = $chatroom_ha['welcome_msg'];
     } else {
         $chatroom_ha['welcome_msg'] = addslashes(translateFN("Benvenuti nella chat di ADA.Ricordatevi di uscire correttamente dalla chat usando l'apposita funzionalita'"));
     }
     if (!empty($chatroom_ha['max_users'])) {
         $chatroom_ha['max_users'] = $chatroom_ha['max_users'];
     } else {
         $chatroom_ha['max_users'] = DEFAULT_MAX_USERS;
     }
     // MOVED TO LINE 422
     //      // check again this field
     //      if(isset($chatroom_ha['id_course_instance'])) {
     //        $chatroom_ha['id_course_instance']=$chatroom_ha['id_course_instance'];
     //      }
     //      else {
     //        $chatroom_ha['id_course_instance']= $id_course_instance;
     //      }
     // write to db and returns the id of the chatroom $id_chatroom.
     //      if (isset($this)) {
     //        $this->chatroom_ha = $chatroom_ha;
     //      }
     $cdh = self::obtainChatDataHandlerInstance();
     $result = $cdh->add_chatroom($chatroom_ha);
     return $result;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:89,代码来源:ChatRoom.inc.php

示例8: link

 function link($id_link)
 {
     //global $dh,$error;
     // constructor
     $dh = $GLOBALS['dh'];
     $error = $GLOBALS['error'];
     $debug = isset($GLOBALS['debug']) ? $GLOBALS['debug'] : null;
     $dataHa = $dh->get_link_info($id_link);
     if (AMA_DataHandler::isError($dataHa) || !is_array($dataHa)) {
         $msg = $dataHa->getMessage();
         if (!strstr($msg, 'record not found')) {
             header("Location: {$error}?err_msg={$msg}");
             exit;
         } else {
             $this->full = 1;
             return $msg;
         }
     }
     if (!empty($dataHa['id_nodo'])) {
         //                foreach ($dataHa as $linkHa) {
         $linkHa = $dataHa;
         //?? �uno solo???
         $this->position = $linkHa['posizione'];
         $this->author = $linkHa['autore'];
         $this->node_id = $linkHa['id_nodo'];
         $this->to_node_id = $linkHa['id_nodo_to'];
         $this->type = $linkHa['tipo'];
         $this->creation_date = $linkHa['data_creazione'];
         $this->style = $linkHa['stile'];
         $this->action = $linkHa['azione'];
         $this->meaning = $linkHa['significato'];
         //                }
         $this->full = 1;
     } else {
         $this->error_msg = translateFN("Nessuno");
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:37,代码来源:node_classes.inc.php

示例9: array

$allowedUsersAr = array(AMA_TYPE_SWITCHER);
/**
 * Performs basic controls before entering this module
 */
$neededObjAr = array(AMA_TYPE_SWITCHER => array('layout'));
require_once ROOT_DIR . '/include/module_init.inc.php';
$self = whoami();
include_once 'include/switcher_functions.inc.php';
include_once ROOT_DIR . '/admin/include/AdminUtils.inc.php';
/*
 * YOUR CODE HERE
 */
require_once ROOT_DIR . '/include/Forms/UserProfileForm.inc.php';
$userId = DataValidator::is_uinteger($_GET['id_user']);
if ($userId === false) {
    $data = new CText('Utente non trovato');
} else {
    $user_info = $dh->_get_user_info($userId);
    if (AMA_DataHandler::isError($userId)) {
        $data = new CText('Utente non trovato');
    } else {
        $viewedUserObj = MultiPort::findUser($userId);
        $viewedUserObj->toArray();
        $user_dataAr = array('id' => $viewedUserObj->getId(), 'tipo' => $viewedUserObj->getTypeAsString(), 'nome e cognome' => $viewedUserObj->getFullName(), 'data di nascita' => $viewedUserObj->getBirthDate(), 'Comune o stato estero di nascita' => $viewedUserObj->getBirthCity(), 'Provincia di nascita' => $viewedUserObj->getBirthProvince(), 'genere' => $viewedUserObj->getGender(), 'email' => $viewedUserObj->getEmail(), 'telefono' => $viewedUserObj->getPhoneNumber(), 'indirizzo' => $viewedUserObj->getAddress(), 'citta' => $viewedUserObj->getCity(), 'provincia' => $viewedUserObj->getProvince(), 'nazione' => $viewedUserObj->getCountry(), 'confermato' => $viewedUserObj->getStatus() == ADA_STATUS_REGISTERED ? translateFN("Si") : translateFN("No"));
        $data = BaseHtmlLib::labeledListElement('class:view_info', $user_dataAr);
    }
}
$label = translateFN('Profilo utente');
$help = translateFN('Da qui il provider admin può visualizzare il profilo di un utente esistente');
$content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'label' => $label, 'help' => $help, 'data' => $data->getHtml(), 'edit_profile' => $userObj->getEditProfilePage(), 'module' => isset($module) ? $module : '', 'messages' => $user_messages->getHtml());
ARE::render($layout_dataAr, $content_dataAr);
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:view_user.php

示例10: translateFN

     * TODO: handle form generation for service with level = 4 and multiple users
     * subscribed.
     */
    $user_infoAr = $users_infoAr[0];
    $id_user = $user_infoAr['id_utente_studente'];
    $tutoredUserObj = MultiPort::findUser($id_user);
    $service_infoAr['id_istanza_corso'] = $id_course_instance;
    $service_infoAr['event_token'] = $event_token;
    /*
     * Check if an eguidance session with this event_token exists. In this case,
     * use this data to fill the form.
     */
    $eguidance_session_dataAr = $dh->get_eguidance_session_with_event_token($event_token);
    if (!AMA_DataHandler::isError($eguidance_session_dataAr)) {
        if ($is_popup) {
            $eguidance_session_dataAr['is_popup'] = true;
        }
        $form = TutorModuleHtmlLib::getEditEguidanceDataForm($tutoredUserObj, $service_infoAr, $eguidance_session_dataAr);
    } else {
        $last_eguidance_session_dataAr = $dh->get_last_eguidance_session($id_course_instance);
        if (AMA_DataHandler::isError($last_eguidance_session_dataAr)) {
            $errObj = new ADA_Error($users_infoAr, translateFN("Errore nell'ottenimento dei dati della precedente sessione di eguidance"), NULL, NULL, NULL, $userObj->getHomePage());
        }
        if ($is_popup) {
            $last_eguidance_session_dataAr['is_popup'] = true;
        }
        $form = TutorModuleHtmlLib::getEguidanceTutorForm($tutoredUserObj, $service_infoAr, $last_eguidance_session_dataAr);
    }
}
$content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'dati' => $form->getHtml());
ARE::render($layout_dataAr, $content_dataAr);
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:eguidance_tutor_form.php

示例11: translateFN

                     $error_message .= translateFN('La dimensione del file supera quella massima consentita.');
                 } else {
                     if (!$accepted_mimetype) {
                         $error_message .= translateFN('Il tipo di file inviato non &egrave; tra quelli accettati dalla piattaforma.') . ' ' . $file_type;
                     }
                 }
                 $form = UserModuleHtmlLib::uploadForm('upload.php', $sess_id_user, $id_course, $id_course_instance, $id_node, $error_message);
                 $form = $form->getHtml();
             }
         }
     } else {
         $form = UserModuleHtmlLib::uploadForm('upload.php', $sess_id_user, $id_course, $id_course_instance, $id_node);
         $form = $form->getHtml();
     }
     $nodeObj = read_node_from_DB($id_node);
     if (!AMA_DataHandler::isError($nodeObj)) {
         $node_title = $nodeObj->name;
         $node_version = $nodeObj->version;
         $node_date = $nodeObj->creation_date;
         $authorHa = $nodeObj->author;
         $node_author = $authorHa['username'];
         $node_level = $nodeObj->level;
         $node_keywords = ltrim($nodeObj->title);
         $node_path = $nodeObj->findPathFN();
     }
     $content_dataAr = array('form' => isset($form) ? $form : '', 'status' => $status, 'user_name' => $user_name, 'user_type' => $user_type, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'title' => $node_title, 'version' => $node_version, 'date' => $node_date, 'author' => $node_author, 'level' => $node_level, 'keywords' => $node_keywords, 'course_title' => $course_title, 'path' => $node_path);
     /* 5.
       HTML page building
       */
     ARE::render($layout_dataAr, $content_dataAr, NULL, isset($optionsAr) ? $optionsAr : null);
 } else {
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:upload.php

示例12: foreach

 * change the two below call to active to let the closed
 * instances completely disappear from the HTML table
 */
if (count($serviceProviders) == 1) {
    $provider_dh = AMA_DataHandler::instance(MultiPort::getDSN($serviceProviders[0]));
    //     $courseInstances = $provider_dh->get_course_instances_active_for_this_student($userObj->getId());
    $courseInstances = $provider_dh->get_course_instances_for_this_student($userObj->getId(), true);
} else {
    foreach ($serviceProviders as $Provider) {
        $provider_dh = AMA_DataHandler::instance(MultiPort::getDSN($Provider));
        //         $courseInstances_provider = $provider_dh->get_course_instances_active_for_this_student($userObj->getId());
        $courseInstances_provider = $provider_dh->get_course_instances_for_this_student($userObj->getId(), true);
        $courseInstances = array_merge($courseInstances, $courseInstances_provider);
    }
}
if (!AMA_DataHandler::isError($courseInstances)) {
    /**
     * @author giorgio 23/apr/2015
     * 
     *  filter course instance that are associated to a level of service having nonzero
     *  value in isPublic, so that all instances of public courses will not be shown here
     */
    $courseInstances = array_filter($courseInstances, function ($courseInstance) {
        if (is_null($courseInstance['tipo_servizio'])) {
            $courseInstance['tipo_servizio'] = DEFAULT_SERVICE_TYPE;
        }
        return intval($_SESSION['service_level_info'][$courseInstance['tipo_servizio']]['isPublic']) === 0;
    });
    $found = count($courseInstances);
    $thead_dataAr = array(translateFN('Titolo'), translateFN('Iniziato'), translateFN('Data inizio'), translateFN('Durata'), translateFN('Data fine'), translateFN('Azioni'));
    /**
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:user.php

示例13: deleteAllSubscriptionsToClassRoom

 public static function deleteAllSubscriptionsToClassRoom($classRoomId)
 {
     $dh = $GLOBALS['dh'];
     $result = $dh->course_instance_students_subscriptions_remove_all($classRoomId);
     if (AMA_DataHandler::isError($result)) {
         return false;
     }
     return true;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:9,代码来源:Subscription.inc.php

示例14: find_exercise_history_for_user

 function find_exercise_history_for_user($exercise_id, $course_instance_id, $user_id)
 {
     $sql = 'SELECT * FROM history_esercizi WHERE id_utente_studente = ? AND id_nodo = ? AND id_istanza_corso = ?';
     $values = array($user_id, $exercise_id, $course_instance_id);
     $result = $this->getRowPrepared($sql, $values, AMA_FETCH_ASSOC);
     if (AMA_DataHandler::isError($result)) {
         return new AMA_Error(AMA_ERR_GET);
     }
     return $result;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:10,代码来源:ama.inc.php

示例15: translateFN

     $msg = $res->getMessage();
     //                    $dh->course_instance_student_presubscribe_remove($id_course_instance,$id_studente);
     //                    header("Location: $error?err_msg=$msg");
     $message_ha["testo"] = translateFN('Gentile') . " " . $firstname . ",\r\n" . translateFN("Si è verificato un errore nell'iscrizione al corso") . " " . $course_name . "\n\r\n\r";
     $message_ha["testo"] .= $body_mail;
     $message_ha["testo"] .= "\n\r\n\r" . translateFN('Per maggiori informazioni scrivi una mail a:') . " " . ADA_ADMIN_MAIL_ADDRESS;
     $message_ha["testo"] .= "\n\r" . translateFN("Buono studio.");
     $sender_email = ADA_ADMIN_MAIL_ADDRESS;
     $recipients_emails_ar = array($payer_email);
 } else {
     //                  header("Location: $back_url?id_studente=$id_studente");
     // Send mail to the user with his/her data.
     $switcherTypeAr = array(AMA_TYPE_SWITCHER);
     $extended_data = TRUE;
     $switcherList = $dh->get_users_by_type($switcherTypeAr, $extended_data);
     if (!AMA_DataHandler::isError($switcherList)) {
         $switcher_email = $switcherList[0]['e_mail'];
     } else {
         $switcher_email = ADA_ADMIN_MAIL_ADDRESS;
     }
     $switcher_email = 'amministrazione@italicon';
     // versione ICON
     $notice_mail = sprintf(translateFN('Questa è una risposta automatica. Si prega di non rispondere a questa mail. Per informazioni scrivere a %s'), $switcher_email);
     $message_ha["testo"] = $notice_mail . "\n\r\n\r";
     $message_ha["testo"] .= translateFN('Gentile') . " " . $firstname . ",\r\n" . translateFN("grazie per esserti iscritto al corso") . " " . $course_name . "\n\r\n\r";
     $message_ha["testo"] .= $body_mail;
     //$message_ha["testo"] .= "\n\r\n\r". translateFN("Ti ricordiamo i tuoi dati di accesso.\n\r username: ") . $user_name . "\n\r" . translateFN("password:" . " " . $user_password);
     $message_ha["testo"] .= "\n\r\n\r" . translateFN("Questo è l'indirizzo per accedere al corso: ") . "\n\r" . $http_root_dir . "\n\r";
     $message_ha["testo"] .= "\n\r" . translateFN("Una volta fatto il login, potrai accedere al corso");
     $message_ha["testo"] .= "\n\r" . translateFN("Buono studio!");
     $message_ha["testo"] .= "\n\r" . translateFN("La segreteria dei Corsi di Lingua Italiana ICoN");
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:student_course_instance_subscribe_ipn.php


注:本文中的AMA_DataHandler::isError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。