]> git.mjollnir.org Git - moodle.git/commitdiff
Merged fixes from 1.6
authormoodler <moodler>
Fri, 22 Sep 2006 13:27:56 +0000 (13:27 +0000)
committermoodler <moodler>
Fri, 22 Sep 2006 13:27:56 +0000 (13:27 +0000)
mod/resource/type/repository/hive/openlitepublish.php [new file with mode: 0644]
mod/resource/type/repository/repository.html

diff --git a/mod/resource/type/repository/hive/openlitepublish.php b/mod/resource/type/repository/hive/openlitepublish.php
new file mode 100644 (file)
index 0000000..7315134
--- /dev/null
@@ -0,0 +1,46 @@
+<?php // $Id$
+
+    require_once("../../../../../config.php");
+
+    if (empty($CFG->hivehost) or empty($CFG->hiveport) or empty($CFG->hiveprotocol) or empty($CFG->hivepath)) {
+        print_header();
+        notify('A Hive repository is not yet configured in Moodle.  Please see Resource settings.');
+        print_footer();
+        die;
+    }
+
+    if (empty($SESSION->HIVE_SESSION)) {
+        print_header();
+        notify('You do not have access to the Hive repository. Moodle signs you into Hive when you log in. This process may have failed.');
+        close_window_button();
+        print_footer();
+        die;
+    }
+
+//================================================
+    $stylesheets = '';
+    foreach ($CFG->stylesheets as $stylesheet) {
+        if(empty($stylesheets)) {
+          $stylesheets = $stylesheet;
+        } else {
+          $stylesheets .= '%26'.$stylesheet;
+        }
+    }
+
+$query  = '';
+$query .= 'HIVE_REF=hin:hive@LMS%20Publish';
+$query .= '&HIVE_RET=ORG';
+$query .= '&HIVE_REQ=2113';
+$query .= '&HIVE_PROD=0';
+$query .= '&HIVE_CURRENTBUREAUID='.$CFG->decsbureauid;
+$query .= '&HIVE_BUREAU='.$CFG->decsbureauid;
+$query .= '&HIVE_ITEMTYPE='.$CFG->decsitemtypeid;
+$query .= '&mkurl='.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php';
+$query .= '&mklms=Moodle';
+$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
+$query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
+$query .= '&mklmsstyle='.$stylesheets;
+
+redirect($CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'?'.$query);
+?>
+
index fdddfdb53b408f194a4c8580ba0a54db555f8b3a..d32cd7ac5bc6e145453a185b98ea9d8fccf87f9a 100644 (file)
         button_to_popup_window ('/mod/resource/type/repository/hive/openlitesearch.php',
                                 'LiteSearch', 'Search for content in Hive ', 500, 750,
                                 'Search for content in the HarvestRoad Hive repository', $options);
+                               // wobble.
+        button_to_popup_window ('/mod/resource/type/repository/hive/openlitepublish.php',
+                               'LitePublish', 'Add new item to Hive ', 500, 750,
+                                'Add new content to the HarvestRoad Hive repository', $options);
+
         helpbutton("hive", "HarvestRoad Hive", "resource/type", true);
     ?>
     </td>
@@ -208,3 +213,4 @@ for ($i=0; $i < $this->maxparameters; $i++) {
 </td></tr>
 
 <?php print_visible_setting($form); ?>
+