-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstore_bundle_connection.php
More file actions
executable file
·35 lines (30 loc) · 1.03 KB
/
store_bundle_connection.php
File metadata and controls
executable file
·35 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* store the course-to-bundle connection in table dasis_bundle_connections
*
* @package DASIS -> Semantic Web
* @author Andre Scherl
* @version 1.0 - 19.11.2010
*
* Copyright (C) 2012, Andre Scherl
* You should have received a copy of the GNU General Public License
* along with DASIS. If not, see <http://www.gnu.org/licenses/>.
*/
require_once("../../config.php");
$addBundleId = optional_param("addToBundle", 0, PARAM_INT);
$courseId = optional_param("courseid", 0, PARAM_INT);
$bundleId = optional_param("bundleId", 0, PARAM_INT);
$newCourseId = optional_param("addCourse", 0, PARAM_INT);
$connection = new object();
if($addBundleId && $courseId) {
$connection->bundle_id = $addBundleId;
$connection->course_id = $courseId;
$DB->insert_record("dasis_bundle_connections", $connection);
}
if($bundleId && $newCourseId){
$connection->bundle_id = $bundleId;
$connection->course_id = $newCourseId;
$DB->insert_record("dasis_bundle_connections", $connection);
}
redirect($_POST["currenturl"]);
?>