Merge branch 'MDL-65306-resourceid-onecommit' of https://github.com/cengage/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 22 May 2020 00:15:03 +0000 (02:15 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 22 May 2020 00:15:03 +0000 (02:15 +0200)
1  2 
mod/lti/mod_form.php

@@@ -201,17 -202,17 +201,23 @@@ class mod_lti_mod_form extends moodlefo
              $mform->setAdvanced('securetoolurl');
              $mform->addHelpButton('securetoolurl', 'secure_launch_url', 'lti');
              $mform->hideIf('securetoolurl', 'typeid', 'in', $noncontentitemtypes);
 +        } else {
 +            // We still need those on page to support deep linking return, but hidden to avoid instructor modification.
 +            $mform->addElement('hidden', 'toolurl', '', array('id' => 'id_toolurl'));
 +            $mform->setType('toolurl', PARAM_URL);
 +            $mform->addElement('hidden', 'securetoolurl', '', array('id' => 'id_securetoolurl'));
 +            $mform->setType('securetoolurl', PARAM_URL);
          }
  
 -        $mform->addElement('hidden', 'urlmatchedtypeid', '', array( 'id' => 'id_urlmatchedtypeid' ));
 +        $mform->addElement('hidden', 'urlmatchedtypeid', '', array('id' => 'id_urlmatchedtypeid'));
          $mform->setType('urlmatchedtypeid', PARAM_INT);
  
+         $mform->addElement('hidden', 'lineitemresourceid', '', array( 'id' => 'id_lineitemresourceid' ));
+         $mform->setType('lineitemresourceid', PARAM_TEXT);
+         $mform->addElement('hidden', 'lineitemtag', '', array( 'id' => 'id_lineitemtag'));
+         $mform->setType('lineitemtag', PARAM_TEXT);
          $launchoptions = array();
          $launchoptions[LTI_LAUNCH_CONTAINER_DEFAULT] = get_string('default', 'lti');
          $launchoptions[LTI_LAUNCH_CONTAINER_EMBED] = get_string('embed', 'lti');