Skip to content

Commit

Permalink
Add option not to import discussions.
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Sep 10, 2021
1 parent 08f11b5 commit b1eb519
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cc/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
<select name="topic" id="topic_select_full">
<!-- <option value="lti">Use discussion tool on this server (LTI)</option> -->
<option value="lti_grade">Use discussion tool on this server (LTI) with grade passback</option>
<option value="lms">Use the Canvas Discussion Tool</option>
<option value="lms">Use the Canvas discussion tool</option>
<option value="none">Do not import discussion topics</option>
</select>
</p>
<?php } else { ?>
Expand Down Expand Up @@ -236,7 +237,7 @@ function sendToCanvas() {
}
}

if ( isset($module->discussions) ) {
if ( isset($module->discussions) && $topic != "none" ) {
foreach($module->discussions as $discussion ) {
$title = isset($discussion->title) ? $discussion->title : $module->title;
$text = isset($discussion->description) ? $discussion->description : $module->description;
Expand Down
2 changes: 2 additions & 0 deletions cc/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<option value="lti">Use discussion tool on this server (LTI)</option>
<option value="lms">Use the LMS Discussion Tool</option>
<option value="lti_grade">Use discussion tool on this server (LTI) with grade passback</option>
<option value="none">Do not import discussion topics</option>
</select>
</p>
<?php } else { ?>
Expand Down Expand Up @@ -131,6 +132,7 @@
<option value="lti">Use discussion tool on this server (LTI)</option>
<option value="lms">Use the LMS Discussion Tool</option>
<option value="lti_grade">Use discussion tool on this server (LTI) with grade passback</option>
<option value="none">Do not import discussion topics</option>
</select>
</p>
<?php } else { ?>
Expand Down

0 comments on commit b1eb519

Please sign in to comment.