function FilePickerFormFields({
  content,
  formFields,
  groupSet,
  ltiLaunchURL,
}) {
  /** @type {Record<string,string>} */
  const extraParams = groupSet ? { group_set: groupSet } : {};
  const contentItem = JSON.stringify(
    contentItemForContent(ltiLaunchURL, content, extraParams)
  );
  return (
    <>
      {Object.entries(formFields).map(([field, value]) => (
        <input key={field} type="hidden" name={field} value={value} />
      ))}
      {groupSet && <input type="hidden" name="group_set" value={groupSet} />}
      <input type="hidden" name="content_items" value={contentItem} />
      {content.type === 'url' && (
        // Set the `document_url` form field which is used by the `configure_assignment`
        // view. Used in LMSes where assignments are configured on first launch.
        <input name="document_url" type="hidden" value={content.url} />
      )}
    </>
  );
}
/**
 * Render the hidden form fields in the file picker form containing information
 * about the selected assignment.
 *
 * This form may be used in two different scenarios:
 *
 *  - A "Content Item Selection" form when configuring an assignment. In this
 *    case the form will look like "Section 3.2, Example Response" in
 *    https://www.imsglobal.org/specs/lticiv1p0/specification
 *  - When an assignment without any content configuration is launched.
 *    See the `configure_assignment` view.
 *
 * @param {FilePickerFormFieldsProps} props
 */
Render the hidden form fields in the file picker form containing information
about the selected assignment.

This form may be used in two different scenarios.

- A "Content Item Selection" form when configuring an assignment.


Render the hidden form fields in the file picker form containing information about the selected assignment . This form may be used in two different scenarios . - A " Content Item Selection " form when configuring an assignment .
function FilePickerFormFields({
  content,
  formFields,
  groupSet,
  ltiLaunchURL,
}) {
  const extraParams = groupSet ? { group_set: groupSet } : {};
  const contentItem = JSON.stringify(
    contentItemForContent(ltiLaunchURL, content, extraParams)
  );
  return (
    <>
      {Object.entries(formFields).map(([field, value]) => (
        <input key={field} type="hidden" name={field} value={value} />
      ))}
      {groupSet && <input type="hidden" name="group_set" value={groupSet} />}
      <input type="hidden" name="content_items" value={contentItem} />
      {content.type === 'url' && (
        <input name="document_url" type="hidden" value={content.url} />
      )}
    </>
  );
}
function FilePickerFormFields ( { content , formFields , groupSet , ltiLaunchURL , } ) { const extraParams = groupSet ? { group_set : groupSet } : { } ; const contentItem = JSON . stringify ( contentItemForContent ( ltiLaunchURL , content , extraParams ) ) ; return ( < > { Object . entries ( formFields ) . map ( ( [ field , value ] ) => ( < input key = { field } type = "hidden" name = { field } value = { value } / > ) ) } { groupSet && < input type = "hidden" name = "group_set" value = { groupSet } / > } < input type = "hidden" name = "content_items" value = { contentItem } / > { content . type === 'url' && ( < input name = "document_url" type = "hidden" value = { content . url } / > ) } < / > ) ; }
Render the hidden form fields in the file picker form containing information
 about the selected assignment.
Render the hidden form fields in the file picker form containing information about the selected assignment .
/** @type {Record<string,string>} */ // Set the `document_url` form field which is used by the `configure_assignment` // view. Used in LMSes where assignments are configured on first launch.