listCourses has a feature/bug -- can't update a course whose course_user table has gone missing

未关闭
#1,440 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, perl
领域
backend, databases

调研方向

The course listing logic that filters candidates for the upgrade-course page is the starting point; the issue quotes the Perl readDirectory grep that lists directories under the courses directory. Read how the upgrade course page builds its candidate list and how it checks for the course_user table. Done would mean the upgrade page lists course directories even when their database tables are missing, without changing any database until the user confirms.

由索引模型根据 Issue 内容生成。

描述

in testing I often leave the directories of courses that I've been working with in ww-docker-data. They may even contain .pg test problems in the directory. I used to rebuild the docker container, then go to upgrade course to rebuild the database tables for these courses and then proceed from there.

Now I can't do that. If the course_user table is missing the course doesn't even appear in the list of candidates for upgrading the course. For most cases this is an advantage, but for the upgrade course page I suggest that we might prefer the old behavior and use
return grep { not (m/^\./ or m/^CVS$/) and -d "$coursesDir/$_" } readDirectory($coursesDir);
to list the courses available for potential upgrade. Comments?

@dlglin has already pointed out that some modifications to this upgrade script are needed so that no modifications are made until the ok is given.

主要语言
Perl
星标
164
派生
167
平均合并
6 天 7 小时
30 天内合并 PR
27

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openwebwork/webwork2 的其他 Issue

查看 openwebwork/webwork2 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。