Skip to content

Commit

Permalink
Processsing: Updated UI
Browse files Browse the repository at this point in the history
- UI didn't work but now work
- Orgs is now hard-coded
note: this will be changed after
  • Loading branch information
Gus-Amorim committed Oct 8, 2024
1 parent c7a816d commit 1789361
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion classes/local/csv_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function execute(command $command, ?filter $filter = null): stdClass {
// The fourth token represents the type of data to fetch ('terms', 'classes', 'enrollments')
$type = $tokens[3] ?? '';
// Get the organisation ID
$orgId = $this->orgId;
$orgId = "org-sch-222-456";

switch ($basepath):
case self::BASEPATH_ORGS:
Expand Down
2 changes: 0 additions & 2 deletions lang/en/enrol_oneroster.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,3 @@
$string['failed_upload_zip_file'] = 'Failed to move the uploaded ZIP file.<br>';
$string['successful_upload'] = 'CSV processing completed.<br>';
$string['invalid_form'] = 'Invalid form submission.<br>';
$string['set_url'] = '/enrol/oneroster/processcsv.php';
$string['title'] = 'Process OneRoster CSV';
10 changes: 5 additions & 5 deletions processcsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

use enrol_oneroster\client_helper;
use enrol_oneroster\form\oneroster_org_selection_form;

require_once('../../config.php');
require_once('classes/client_helper.php');
require_once(__DIR__ . '/form/oneroster_csv_form.php');
require_once(__DIR__ . '/form/oneroster_org_selection_form.php');
require_once(__DIR__ . '/classes/local/csv_client.php');
require_once('classes/local/csv_client.php');
require_once(__DIR__ . '/classes/local/csv_client_helper.php');

/**
Expand All @@ -34,10 +35,10 @@
*
*/

$PAGE->set_url(get_string('set_url', 'enrol_oneroster'));
$PAGE->set_url('/enrol/oneroster/processcsv.php');
$PAGE->set_context(\context_system::instance());
$PAGE->set_title(get_string('title', 'enrol_oneroster'));
$PAGE->set_heading(get_string('title', 'enrol_oneroster'));
$PAGE->set_title('Process OneRoster CSV');
$PAGE->set_heading('Process OneRoster CSV');
global $DB;
$mform = new oneroster_csv_form();

Expand Down Expand Up @@ -129,7 +130,6 @@
// Proceed to process the selected organization
process_selected_organization($selected_org_sourcedId, $tempdir);
exit;

}
else {
echo $OUTPUT->header();
Expand Down

0 comments on commit 1789361

Please sign in to comment.