【问题标题】:Upload files to moodle under a selected course将文件上传到所选课程下的moodle
【发布时间】:2017-09-09 18:45:05
【问题描述】:

我使用 moodle rest api 创建了一个特定的课程,我想在该特定课程中添加一个文件。该课程可能采用周/主题形式。我需要在选定的主题/周下添加上传的文件,我该如何实现? .我使用 core_files_upload 上传文件,但如何将其添加到所选课程?

Array 
(
    [contextid] => int        
    [component] => string        
    [filearea] => string        
    [itemid] => int        
    [filepath] => string        
    [filename] => string        
    [url] => string        
)

【问题讨论】:

    标签: moodle moodle-api moodle-mobile


    【解决方案1】:

    为了使文件出现在课程中,您需要在课程中创建“mod_resource”活动的实例,然后将相关文件附加到该资源。

    我认为目前没有任何用于在课程中创建活动的网络服务(https://tracker.moodle.org/browse/MDL-40779 似乎仍然不完整)。

    目前您能做的最好的事情是创建一个自定义 Moodle 插件(可能是 local plugin),然后实现 your own webservice 以添加此功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多